DragonRAD Forum
May 25, 2013, 12:28:27 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Stopping event actions  (Read 470 times)
wesoos
Member
***
Posts: 106


View Profile
« on: December 01, 2010, 10:12:23 AM »

Guys,  if I have a list of actions in a button click or menu item or something, is there a way to not continue with the rest of the actions after a script action.

Right now I'm doing some things with a script action, and if something is not right I set a validation on some field and I'll have a save action after the script action, which causes no more actions but it pops up an alert saying "Cannot save...."  Any way I can stop the rest of the actions with something in the script itself and get rid of the save action?

Thanks
Logged
YiLiu
Seregon
****
Posts: 202


View Profile
« Reply #1 on: December 01, 2010, 10:47:29 AM »

Might you give a try to set a filed value into a hidden field in your script, and other actions' running condition can be binded to the value of this field.

If only for save action, you can move the save action into the script by calling clientevent.form.save(). But if you have other actions, the above way might be easier.
Logged
IanBowles
Administrator
*****
Posts: 122


View Profile
« Reply #2 on: December 01, 2010, 10:53:12 AM »

In your script, you can set clientevent.cancel = true, which will terminate execution of any more actions.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!