Search code examples
javascriptuser-controlsgenexus

Trigger some event in UC through javascript code


It is possible to trigger an event in the UC javascript code? I have a javascript function in the UC code, and at the end of that function I want to trigger an event that executes the code associated with an event in the Genexus IDE.

Like this:

UC javascript code:

function save() {
  ...
  trigger event myevent;
}

In Genexus Event tab:

Event myevent
  msg("Event triggered!")
EndEvent

Solution

  • In the usercontrol definition you can define events with GeneXus Code.

    That Event will be fired anytime you want from client side.

    UserControls - Documentation ("Events" section)