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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

html button/form quickie

Status
Not open for further replies.

fylnc

Technical User
Apr 24, 2002
15
GB
I have a mailto form which posts data to an email address
i want the page to change when i hit the submit button

what do i need to add to this code??
<form method=&quot;POST&quot; ACTION=&quot;mailto:anemailadress@dummy.com&quot;>

(kind of like 2 ACTIONs...which won't work)
do i need javascript for this??

any ideas???

cheers
fyl
 
Try this:

<script>
function doIt(f) {
f.action = &quot;mailto:anemailadress@dummy.com&quot;;
f.submit();
document.location.href = &quot;another.html&quot;;
}
</script>

<form method=&quot;POST&quot; onsubmit=&quot;doIt(this)&quot;>
 
woo hoo

nice one starway...

Fyl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top