Alpha Video Training
Results 1 to 3 of 3

Thread: V10 Ajax Callback to XBasic Function

  1. #1
    Member
    Real Name
    Ian McCall
    Join Date
    Mar 2006
    Location
    Aberdeenshire, Scotland
    Posts
    39

    Default V10 Ajax Callback to XBasic Function

    I'm trying to use the Ajax callback functionality (one of the Action Javascripts) attached to a grid button, to invoke an Xbasic function declared in the miscellaneous section of a grid.

    The help notes in the Action Javascript dialog state that the function must be "functionX as c (e as p)" and that all the data in the current row (as long as that option is selected elsewhere in the Action JS dialog), will be passed to the function as e.

    I'm drawing a blank when trying to reference that data in the function using e as a pointer, for eg to reference the Id field of the row the button was pressed in I've tried e.Id, e.DataSubmitted.Id, e.RowNumber.Id, e.Grid.Id etc etc all with the same "sub element not found" error when I hit the button.

    Hardcoding values into the function, i.e. without any ref to
    rowdata, the function is called and runs OK.

    Does anybody know the correct syntax to reference the row data?

  2. #2
    "Certified" Alphaholic Lance Gurd's Avatar
    Real Name
    Lance Gurd
    Join Date
    Jun 2005
    Location
    Southampton, UK
    Posts
    1,445

    Default Re: V10 Ajax Callback to XBasic Function

    Found this in the OnExistingRowRender Event
    'e.rowData - Data for the current row. For example, to get the value of the 'lastname' field: e.rowData.data("lastname")
    Hope it helps. Too busy learning it all to try out!

  3. #3
    Member
    Real Name
    Ian McCall
    Join Date
    Mar 2006
    Location
    Aberdeenshire, Scotland
    Posts
    39

    Default Re: V10 Ajax Callback to XBasic Function

    Gave that a try but it didn't work either.

    Thanks for the suggestion though Lance.

Similar Threads

  1. AJAX Callback question
    By Mike Reed in forum Application Server Version 9 - Web/Browser Applications
    Replies: 3
    Last Post: 04-27-2009, 11:14 AM
  2. Example of Ajax Callback from Dialog
    By eboughey1 in forum Application Server Version 9 - Web/Browser Applications
    Replies: 3
    Last Post: 03-09-2009, 09:41 PM
  3. Ajax Callback Session Variable and Debugging
    By chris.hazeslip in forum Application Server Version 9 - Web/Browser Applications
    Replies: 6
    Last Post: 02-27-2009, 03:17 PM
  4. AJAX Callback syntax question
    By Steve Wood in forum Application Server Version 9 - Web/Browser Applications
    Replies: 7
    Last Post: 02-25-2009, 06:14 PM
  5. callback response format in AJAX
    By ColinJD in forum Application Server Version 9 - Web/Browser Applications
    Replies: 4
    Last Post: 01-14-2009, 05:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •