Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

javascript help please

Status
Not open for further replies.

Baph

Programmer
Aug 24, 2000
20
0
0
NZ
I'm using a javascript mail form, which works fine. But I would like to modify the submit button so that on mousedown it also goes to a confirmation page. How do I right this into the javascript? [sig][/sig]
 
Something like this should work...

<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;>


<!-- START OF SCRIPT -->
<!-- For more scripts visit -->
<HTML><HEAD><TITLE>Verify Form</TITLE></HEAD>

<SCRIPT LANGUAGE=&quot;javascript&quot;>
function doVerify()
{
location.href = &quot;thanks.html&quot;
}
</script>



<!-- END OF SCRIPT -->

<BODY BGCOLOR=&quot;FFFFFF&quot;>
<font face=arial><font size=2>
This JavaScript will email the input to you and send the user,
after clicking send it to a &quot;Thank You&quot; page or something
of that sort.<p>

<FORM method=&quot;POST&quot; action=&quot;mailto:somebody@some.net&quot; onSubmit=&quot;alert('Mail is being sent')&quot;>
<B>Please enter your name: </B><input NAME=&quot;username&quot; size=&quot;30&quot;>
<input type=submit onBlur=&quot;doVerify()&quot; value=&quot;Send it!&quot;>
<input type=reset value=&quot;Start over&quot;>


</form>




</body>
</html>

[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top