jayke00
11-24-2003, 04:02 PM
Hey,
Im rather new to JS and have a simple quesiton about a confirm script Im trying to use in some forms. The code is as follows:
<SCRIPT LANGUAGE="JavaScript">
function askData() {
var agree=confirm("Do you want to continue?");
if (agree)
return true ;
else
return false ;
}
</SCRIPT>
Im using the confirm script to ask the user if they want to continue when they click on the submit button. My problem is that i have multiple forms and buttons on the page, and Im wanting to change the question that is asked depending on which one they click. So what I need is some way send the variable from the button to the "Do you want to continue?" area in the function.
Does anyone know how I could do this?
Thanks :)
Im rather new to JS and have a simple quesiton about a confirm script Im trying to use in some forms. The code is as follows:
<SCRIPT LANGUAGE="JavaScript">
function askData() {
var agree=confirm("Do you want to continue?");
if (agree)
return true ;
else
return false ;
}
</SCRIPT>
Im using the confirm script to ask the user if they want to continue when they click on the submit button. My problem is that i have multiple forms and buttons on the page, and Im wanting to change the question that is asked depending on which one they click. So what I need is some way send the variable from the button to the "Do you want to continue?" area in the function.
Does anyone know how I could do this?
Thanks :)