Forum Moderators: phranque
I am including the original FrontPage form code, omitting the javascript and actual form questions as they are unnecessary at this point.
<FORM METHOD="POST" ACTION="../_derived/nortbots.htm" onSubmit="location.href='../_derived/nortbots.htm';return false;" webbot-onSubmit webbot-action="--WEBBOT-SELF--">
<!--WEBBOT BOT=SaveResults S-Email-Format="TEXT/PRE" S-Email-Address="myemail@mysite.net" B-Email-Label-Fields="TRUE" B-Email-ReplyTo-From-Field="TRUE" S-Email-ReplyTo="UserEmail" B-Email-Subject-From-Field="TRUE" S-Email-Subject="Truck Quote" S-Builtin-Fields startspan
--><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults" i-checksum="43374" endspan --><blockquote>
</blockquote>
<INPUT TYPE=SUBMIT VALUE="Submit Form">
<INPUT TYPE=RESET VALUE="Reset Form">
</form>
I am completely confused by the "../derived/nortbots.htm" reference, this was something FrontPage created. Same with the ' onSubmit="location.href='../_derived/nortbots.htm';return false;" '
Was I supposed to create a derived folder? A nortbots.htm page? If so, what is this page to include? Any help would be appreciated.
Let's look at a "normal" form and compare it with yours. This may seem like a long way around the fence, but it's all relevant as you will see.
<form method="post" action="anywhere.cgi">
<input type="submit" value="submit">
</form>
This will post all the data in the form to "anywhere.cgi". Now let's add some Javascript. Our Javascript will manage the form submit, so we will pass a reference of it to the JS.
<form method="post" action="anywhere.cgi" onsubmit="return checkForm(this);">
<input type="text" name="fname" id="fname" value="">
<input type="submit" value="submit">
</form>
<script type="text/javascript">
function checkForm(form) {
if (document.getElementById('fname').value=='') {
alert('The name is required');
}
else { form.submit(); }
return false;
}
</script>
On submit, the form object ("this") is passed to the function checkForm and is stored in the variable "form." If the fname field is blank, it will alert the user, otherwise the Javascript submits the form with the line "form.submit()."
But what stops the submit button from submitting the form, hence doing it twice? The "return false" from this function tells the browser NOT to do it's natural action, submit the form.
So, now let's look at yours:
<FORM METHOD="POST" ACTION="../_derived/nortbots.htm" onSubmit="location.href='../_derived/nortbots.htm';return false;">
So whatever is going on, this form will never submit. The form action is irrelevant because the return false says "no, don't submit the form, do what I tell you in the onSubmit handler." It will just redirect to "../derived/norbots.htm" and none of the values will be passed to whatever "norbots.htm" is - and being a static page, it wouldn't do anything with it anyway.
I'd say, in the absence of any other info, this mess might have something to do with this:
webbot-onSubmit webbot-action="--WEBBOT-SELF--"
in which case Front Page Extensions are doing something to automate the form processing. That I can't help you with.
Edit: Hah. Do a G search for notbots.htm, this is something that's "out there" with F.P.