onSubmit

Results 1 to 3 of 3

Thread: onSubmit

  1. #1
    Join Date
    Dec 1969
    Posts
    572

    Default onSubmit

    I&#039m calling ASP file from the Data Input Form. <BR><BR>...<BR> funcion Valid()<BR> if (condition)<BR> return false<BR><BR>.....<BR>&#060;form action="abc.asp" method="POST" onSubmit="Valid()"&#062;<BR>.......<BR><BR>As I understand if Valid() returns FALSE my ASP file is not supposed to be run. But it is. Why??? How can I avoid this?<BR><BR>Thanks for Your help.<BR><BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    25

    Default RE: onSubmit

    simple little thing called "return"<BR>onSubmit="return valid()"<BR>this is done just like so in Javascript <BR>and Jscript supports 99% of Javascript functions <BR>except the DOM that is <BR>Jscript can call VBscript a same other way around or they can both use varibles that the other script declared with its asignment procedure other than that If it comes down to it just use Jscript to write your valid function you can just use a javascript function and transfer it over<BR>with very few changes

  3. #3
    Join Date
    Dec 1969
    Posts
    572

    Default RE: onSubmit

    Thanks.<BR><BR>The problem is that I use JavaScript and I tryed <BR>onSubmit="return Valid()" and the result was the same<BR>(if valid() returns false the .asp file is called).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •