Multiple Submit Buttons

Results 1 to 2 of 2

Thread: Multiple Submit Buttons

  1. #1
    Join Date
    Dec 1969

    Default Multiple Submit Buttons

    I have three submit buttons on my page. Submit1 and Submit2 are for navigating through a oRs. When you click on Submit3, I want the form to validate before submitting the data to the server. I originally had used the onsubmit handler but anytime that I would click submit1 or submit2, the form would still validate and then goto the next page !! I only want this to happen when you click on the Submit3....<BR><BR>Can anyone please help me out?<BR><BR>I tried this:<BR><BR>&#060;form id=FORM1 name=FORM1 method="post"&#062;<BR><BR>&#060;INPUT id=txtName name=txtName&#062;<BR><BR>&#060;INPUT id=Submit type=Submit size=40 value=Previous name=Submit&#062;<BR>&#060;INPUT id=Submit type=Submit value=Next name=Submit&#062;<BR>&#060;INPUT id=cmdSubmit name=cmdSubmit type=button value="Submit"&#062; <BR><BR><BR>Sub cmdSubmit_OnClick<BR><BR>&#039; Check to see if the user entered anything.<BR><BR> If FORM1.txtName.value = empty Then<BR><BR> MsgBox "Name field is empty."<BR><BR>else<BR>FORM1.submit()<BR>end if<BR><BR><BR>End Sub<BR><BR>but I keep getting an error on FORM1.submit()<BR><BR><BR>Any ideas or possible work arounds?

  2. #2
    Join Date
    Dec 1969

    Default Why is this in JS forum...

    ...when you are using client-side VBScript to do validation???<BR><BR>Anyway, you don&#039;t say *what* you want the Previous and Next buttons to do.<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