Very basic Submit form question
I have a form with a couple of text fields that get emailed to me when the user clicks Submit. What I am trying to do is show an alert message box saying Thank you your request has been submitted. Or Redirect to a Thank you page. I just can't seem to get Both the Submit button and the redirect to work together. Below is my code with out the redirect or alert..
<HTML>
<Tile><h1> Action Request Form </h1></Tilte>
<HEAD>
</Head><BODY bgColor=White>
<HR>
<FORM METHOD="post" ACTION= "mailto:[email protected]?subject=Action Request" ENCTYPE="text/plain">
<h1> Name:</h1>
<INPUT NAME="name" SIZE="30" >
<h1> Description:</h1><TEXTAREA name=Description rows=6 cols=40></TEXTAREA>
<h1>How Soon is This Needed? </h1>
<INPUT TYPE="radio" NAME=Time VALUE="Urgent">
Urgent
<br>
<INPUT TYPE="radio" NAME=Time VALUE="ASAP">
ASAP
<br>
<INPUT TYPE="radio" NAME=Time VALUE="Tomorrow">
Tomorrow
<br>
<INPUT TYPE="radio" NAME=Time VALUE="Couple of Days">
Couple of Days
<br>
<INPUT TYPE="radio" NAME=Time VALUE="When Ever">
When Ever
<P>
<br><BR>
<INPUT TYPE="submit" id=submit1 value="Submit" name=submit1 >
<INPUT TYPE="reset" value=Reset>
</FORM></P></BODY></HTML>
Still get error on WF_1.time
Thanks Scoutt,
It works I did have to put name="WF_1" in the Form Tag. also I had to give the name text a type of "text" <INPUT NAME="name" type="text" SIZE="30" >. I still get an Error on the Radio Buttons.
if (document.WF_1.time.value.length == 0) {
alert ("The 'Time' field requires an entry.");
return false;
}
The error is document WF_1.time.value.legnth is null or not an object. any ideas?
I got the same error on the WF_1 name but I noticed name was Capitalized Name after changing it that and the description fields work.
Troy
I can use CGI I just don't know enough about it
I can use CGI I just don't know enough about it. If you have a CGI script for something like this maybe you can post it and I will give it a go! I tried the code from your last reply. It doesn't look at the radio buttons? nor will the mailto work? I have been trying to debug it but I'm not very good at HTML and Scripts. I am mainly a VB user.
-Troy