JS & fronpage form

S

shai w

I’m using FP2003 to create a simple form.
I planted a JS function (“on clickâ€) so once form submitted it will go to a
confirmation page depending on the original page that directed me to the form

The function works but when associated with the FP form the form won’t send
the msg. To my email

Any suggestions?

Shai w.


Here is the code:

<body>

<script type="text/javascript">
var A = document.referrer
function checkReferrer()
{
if (A == "http://www.mysite.com/page1.htm")

{
window.location="http://www.mysite.com/thankyou-page1.htm"
}

else if (A == "http://www.mysite.com/page2.htm")

{
window.location="http://www.mysite.com/thankyou-page2.htm"
}
}
</script>

<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" S-Label-Fields="TRUE"
B-Reverse-Chronology="FALSE" S-Builtin-Fields startspan
S-Email-Address="(e-mail address removed)" S-Email-Format="TEXT/PRE"
B-Email-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP"
VALUE="0"><!--webbot bot="SaveResults" endspan i-checksum="43374" -->
<p><input type="text" name="T1" size="20"></p>
<p><input type="submit" value="Submit" name="B1"
onclick="checkReferrer()"><input type="reset" value="Reset" name="B2"></p>
</form>

</body>
 
S

Steve Easton

You can't mess with the submit button in a form, either by adding a hyperlink or a click
event as either one will break it.

You'll need to find another method.

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top