can I combine several "on_submit" 's ?

Results 1 to 2 of 2

Thread: can I combine several "on_submit" 's ?

  1. #1
    Join Date
    Dec 1969

    Default can I combine several "on_submit" 's ?

    The following code doesn&#039;t work for me - It certainly isn&#039;t doing my "copy_values" function. I am having trouble combining all these functions into the on_submit - is my structure correct ?<BR><BR><BR>&#060;form action="savejob.asp" method="post" name="HTMLeditorForm" onsubmit="return (validateForm(this) && validateDescriptions(this.J__SDESC , this.J__LDESC, this) && copy_values(this));"&#062;<BR><BR>- Thank You

  2. #2
    Join Date
    Dec 1969

    Default Should work...

    But that *assumes* that each of the functions returns true on success and false on failure.<BR><BR>I would guess that one of the two validate functions is returning false [or not returning anything at all] and so the "shortcut operation" inherent in the && operator will stop the code from calling the last function.<BR><BR>All *MUST* return true for all to run and for the submit to take place.<BR><BR>

Posting Permissions

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