joonstar
08-27-2004, 12:49 AM
<SCRIPT LANGUAGE=JAVASCRIPT>
function verify(){
msg = "Are you absolutely sure that you want to submit this form?";
//all we have to do is return the return value of the confirm() method
return confirm(msg);
}
</SCRIPT>
</HEAD>
<BODY>
<FORM ACTION="action.cfm" onSubmit="return verify()">
Name: <INPUT TYPE=TEXT NAME="myName" size=30><BR>
<INPUT TYPE=SUBMIT VALUE="Submit">
</FORM>
</BODY>
The above code gives an alert confirmation when a user clicks the submit button using input form tag.
Can I give the alert confirmation when a user clicks the submit button using Anchor Link?
The following code doesn't work correctly, but it will help you to understand what I am trying to do.
<SCRIPT LANGUAGE=JAVASCRIPT>
function verify(){
msg = "Are you absolutely sure that you want to submit this form?";
//all we have to do is return the return value of the confirm() method
return confirm(msg);
}
</SCRIPT>
</HEAD>
<BODY>
<a href="action.cfm" onSubmit="return verify()"> Submit </a>
</BODY>
Thanks in Advance
function verify(){
msg = "Are you absolutely sure that you want to submit this form?";
//all we have to do is return the return value of the confirm() method
return confirm(msg);
}
</SCRIPT>
</HEAD>
<BODY>
<FORM ACTION="action.cfm" onSubmit="return verify()">
Name: <INPUT TYPE=TEXT NAME="myName" size=30><BR>
<INPUT TYPE=SUBMIT VALUE="Submit">
</FORM>
</BODY>
The above code gives an alert confirmation when a user clicks the submit button using input form tag.
Can I give the alert confirmation when a user clicks the submit button using Anchor Link?
The following code doesn't work correctly, but it will help you to understand what I am trying to do.
<SCRIPT LANGUAGE=JAVASCRIPT>
function verify(){
msg = "Are you absolutely sure that you want to submit this form?";
//all we have to do is return the return value of the confirm() method
return confirm(msg);
}
</SCRIPT>
</HEAD>
<BODY>
<a href="action.cfm" onSubmit="return verify()"> Submit </a>
</BODY>
Thanks in Advance