Can Moi Buttons in HTM files execute code in the assoicated JS file

Next
 From:  fcwilt
11713.1 
Hi Michael,

In one of your example files you have this:

<moi:PushButton id="doit" onclick="message.style.display = 'block';">Click Me!</moi:PushButton>

but all it appeared to do was to modify the displayed HTML.

Is there a way to have buttons execute code in the associated script file?

My current HTM file contains a drop-down combo to select what happens when the Done button is clicked.

But it would be slightly more efficient if there were just three buttons, one for each action, rather than picking the action and then clicking the Done button.

Thanks

Frederick
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Michael Gibson
11713.2 In reply to 11713.1 
Hi Frederick, yes when a UI control is clicked it will generate a UI event with the control's id value.

That will cause the script's event loop to wake up and it can do something in response.

Here's an example.

- Michael
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All