No announcement yet.

ajax event onClick for grid fields

  • Filter
  • Time
  • Show
Clear All
new posts

  • ajax event onClick for grid fields

    In a grid I created an ajax on click event for a field.

    The event is fired if I use SC macros inside the event, e.g. sc_ajax_message() or sc_field_display().

    But it seems that any standard javascript command does not work.
    I tried a simple alert() and nothing happens.

    What am I doing wrong?

  • #2
    Because this ajax onClick event expects PHP code, not JS, for this reason alert don't works.

    Professional Scriptcase Services
    Some Customers opinions


    • #3
      I don't get it: shouldn't the onClick event be processed by the browser, hence run a JS function?

      Anyway, I'm trying to have an onClick event on a field that retrieve data from the server transparently and then show the output in another field (same grid\row).

      I think I need to write an onclick event that does what this example does:
      AJAX - Send a Request To a Server

      I created a blank application that just php prints what I need to show in the grid so that the XMLHttpRequest can run it and get the output.
      But where in the grid can I write the XMLHttpRequest code?


      • #4

        In the onHeader as php echo.