Client or Server script to prevent action from taking place

is there syntax I can use to associate to a form btnClick event in order to prevent an action from taking place using either client or server scripting (Code activity)? I assume this would be placed at event handler 'when action started'? or on form submission?

 

i can't seem to find anything on this.

 

Tagged:

Comments

  • valid = true;

    message = "Please complete the following";

     

    //Add your validation, setting the Valid to false and adding to the message

     

    if (!valid)
    {
        alert(message);
        window.event.cancel();
    }
    //this doesn't do anything but added for completeness.
    return true;

     

    Cheers

    Graham