Submit Sends Email And Loads New Page

[Total: 0    Average: 0/5]

This shows how to have a submit type button in a form cause a mail message to be sent, and have the current page load a different URL.

Body Code:

<form name=f1>
<input type=text name=who value=""><BR>
<input type=text name=where value=""><BR>
<input type=button onclick="doit()" value="submit">
<script type=text/javascript>
function doit() {
  document.location = "mailto:"+document.f1.who.value;
  setTimeout("document.location = document.f1.where.value;",300);

Times Viewed: 2

Leave a Reply

Your email address will not be published. Required fields are marked *