Using ew_Ajax()

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
dire
User
Posts: 41

Using ew_Ajax()

Post by dire »

Hello,

I'm trying to get data from master into detail table. I choose folowing principle:

  1. Server - Table specific - Add/Copy Page - Page Load
    ew_SetClientVar("SqlFnd_PogObrObd", ew_Encrypt("SELECT fk_sif_obracunsko_obdobje_id FROM pogodba WHERE pogodba_id = {query_value}"));

  2. Client script - Table specific - Startup script
    var pogid = $(this).fields("fk_pogodba_id").value(); - From this field I get main ID
    var resObrObd = ew_Ajax(ewVar.SqlFnd_PogObrObd,pogid); - I run sql with main ID

  3. On specific field (where I want to get a value) i run
    $(this).fields("fk_sif_obracunsko_obdobje_id").value(resObrObd));

It doesn't work, any idea?

Thx


Webmaster
User
Posts: 9425

Post by Webmaster »

$(this).fields() won't work in Startup Script because "this" is window object in Startup Script. You should select the HTML element first.

To debug your codes, set a break point to your JavaScript codes (e.g. use Google Chrome Developer Tools) or use JavaScript alert codes to show the values.


Post Reply