using vbscript with asp

Results 1 to 2 of 2

Thread: using vbscript with asp

  1. #1
    Join Date
    Dec 1969

    Default using vbscript with asp

    I created a vbscript function that is a message box to verify if<BR>the selection made is the one that the user realy wants. They <BR>first have to either hit a save button which saves the date to a <BR>db or they have to hit a finalize button which does what the save button does but it also finalizes the page and takes the buttons away so that the page can only be finalized once every week. My problem is, that both the save button and the finlaize button are submit buttons. So when trying to either save or submit, the function wants to run for both.<BR><BR><BR>This is the part that is the function and the form tag to then run the code that actualy adds all the fields up and saves them.<BR><BR>&#060;SCRIPT LANGUAGE="VBScript"&#062;<BR>&#060;!--<BR>Function MyForm_onSubmit<BR> If Msgbox("Are you sure you want to finalize?", vbYesNo + vbExclamation) = vbNo Then<BR> MyForm_onSubmit = False<BR> End If<BR>End Function<BR>// --&#062;<BR>&#060;/SCRIPT&#062;<BR><BR><BR>&#060;FORM METHOD="get" value="Finalize" ACTION="http://the web" NAME="MyForm"&#062;<BR><BR><BR>Do you have any ideas how to get around the two submit buttons seeing the function<BR><BR>I&#039;m sure that what I asked is as clear as muddy water<BR><BR>Thanks for your time on my question

  2. #2
    Join Date
    Dec 1969

    Default RE: using vbscript with asp

    Have you tried putting the function in the onClick event of the button, instead of the onSubmit?

Posting Permissions

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