form validation

Results 1 to 2 of 2

Thread: form validation

  1. #1
    Join Date
    Dec 1969

    Default form validation

    I have a form with three submit button working on if else criteria. I want to associate the form level validation using client side java script to only one of the submit button which checks if all the required fields are filled currently in my java script after checking all the fields I have to see if strMsg is blank or not and execute the statements on that. The problem it is working in such a manner that it does associate the form level validation to one of the button and pop up the alert but when I hit the ok button on the pop up alert it take me to the form process page rather than keeping me on the same page . <BR><BR><BR>if (strMsg ! = &#039&#039)<BR><BR> {<BR><BR> alert("The following field(s) must be completed:
    " + strMsg.substr(0, strMsg.length - 2));<BR><BR> return false;<BR><BR> }<BR><BR> else {<BR> <BR> document.form1.SUbmit();<BR> }<BR><BR>I know this is not a asp question but i have wasted too much time on it and want help <BR>thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: form validation

    Well,<BR><BR>I have done this, what I found is, that one browser or another will not support it, I could not find a cross browser version of the confirm function. It will work in newer ie versions, but that was all I found, I recommend rethinking your process flow.<BR><BR>hth

Posting Permissions

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