Hey All,
I am creating a simple website through Dreamweaver. It was made though frames, a fixed frame on the left, and a main frame that changes on the right. I have 2 forms created, one for employees to fill out and one for employers to fill out. I have implimented a standard form mailer .php text to submit these forms to my email address. That part is working wonderfully, my problem is that after the forms are successfully submitted the website crashes back to the inital default page when I need it to go to a confirmation page so the user can go onto paypal. I have done much research and found no help on how to create a SIMPLE code solution to just redirect my forms once submitted. I also cannot figure out where to put some of the code solutions I have been given, so placement descriptions are also important! Each form has a submit button at the bottom which was made through dreamweaver. Do I need to attach code to the submit button? Do I need to make a new php and somehow attach it to the specific form I am submitting? Some solutions I have found have required additions to the default.html page, but I have more than one form to attach an action to because each form has a separate confirmation page due to separate pricing.
Also, I do not have access to the mailer code that was provided by my host, so I cannot make changes to that php code, or provide it to you to overlook. I can provide the code for one of my forms to help with explaination. The code below is the Employee Form code which needs to redirect to a paypal Employee confirmation. If I can figure out how to manage this forms redirection, I should be able to apply it to the other form (for Employers) because they are fairly similar.
so basically HELP ME!
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Employee Form</title>
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<body onload="MM_preloadImages('assets/contractDOWN.png')">
<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan -->
<script Language="JavaScript" Type="text/javascript"><!--
function FrontPage_Form1_Validator(theForm)
{
if (theForm.select.selectedIndex < 0)
{
alert("Please select one of the \"WorkPreference\" options.");
theForm.select.focus();
return (false);
}
if (theForm.select.selectedIndex == 0)
{
alert("The first \"WorkPreference\" option is not a valid selection. Please choose one of the other options.");
theForm.select.focus();
return (false);
}
if (theForm.Name.value == "")
{
alert("Please enter a value for the \"Name\" field.");
theForm.Name.focus();
return (false);
}
if (theForm.Address.value == "")
{
alert("Please enter a value for the \"Address\" field.");
theForm.Address.focus();
return (false);
}
if (theForm.City.value == "")
{
alert("Please enter a value for the \"City\" field.");
theForm.City.focus();
return (false);
}
if (theForm.State.value == "")
{
alert("Please enter a value for the \"State\" field.");
theForm.State.focus();
return (false);
}
if (theForm.Zip.value == "")
{
alert("Please enter a value for the \"Zip Code\" field.");
theForm.Zip.focus();
return (false);
}
if (theForm.MainPhone.value == "")
{
alert("Please enter a value for the \"Phone Number\" field.");
theForm.MainPhone.focus();
return (false);
}
if (theForm.AvailStateDate.value == "")
{
alert("Please enter a value for the \"Available Start Date\" field.");
theForm.AvailStateDate.focus();
return (false);
}
if (theForm.LicenseNo.value == "")
{
alert("Please enter a value for the \"License Number\" field.");
theForm.LicenseNo.focus();
return (false);
}
return (true);
}
//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" action="/webformmailer.php" onSubmit="redirect(http://www.prohitlist.com/paypalEmployees)" language="JavaScript" webbot-action="--WEBBOT-SELF--">
<input TYPE="hidden" NAME="Employee Form Data" VALUE="0">
<div align="left">
<table width="73%" border="0" cellpadding="2" cellspacing="1">
<tr>
<td colspan="7" align="center"><font face="Arial"><strong>Employee Registration Form</strong><font size="2"><br />
*Indicates Required field</font></font></td>
</tr>
<tr>
<td colspan="7" align="center"><img border="0" src="assets/line.png" width="800" height="10" /></td>
</tr>
<tr>
<td colspan="4"><font face="Arial"><font size="2">Preference*:
</font>
<!--webbot bot="Validation" s-display-name="WorkPreference" b-value-required="TRUE" b-disallow-first-item="TRUE" --><select name="select" id="select" size="1">
<option value="one">Choose one</option>
<option value="hygienist">Hygienist</option>
<option value="assistant">Assistant</option>
<option value="office">Front Office</option>
</select><font size="2"> </font></font> </td>
<td width="78"><font face="Arial"><font size="2">Date: </font>
<input name="Date" type="text" id="Date" size="10" />
</font></td>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="3"><font face="Arial"><font size="2">Name*: </font>
<!--webbot bot="Validation" s-display-name="Name" b-value-required="TRUE" --><input name="Name" type="text" id="Name" size="31" /></font></td>
<td colspan="2"><font face="Arial"><font size="2">Address*: </font>
<!--webbot bot="Validation" s-display-name="Address" b-value-required="TRUE" --><input name="Address" type="text" id="Address" size="29" /></font></td>
<td colspan="2"> </td>
</tr>
<tr>
<td><font face="Arial"><font size="2">City*: </font>
<!--webbot bot="Validation" s-display-name="City" b-value-required="TRUE" --><input name="City" type="text" id="City" size="22" /></font></td>
<td colspan="2"> </td>
<td><font face="Arial"><font size="2">State*: </font>
<!--webbot bot="Validation" s-display-name="State" b-value-required="TRUE" -->
<input name="State" type="text" id="State" size="5" />
</font></td>
<td><font face="Arial"><font size="2">Zip*: </font>
<!--webbot bot="Validation" s-display-name="Zip Code" b-value-required="TRUE" -->
<input name="Zip" type="text" id="Zip" size="5" />
</font></td>
<td colspan="2"> </td>
</tr>
<tr>
<td width="183"><font face="Arial"><font size="2">Main Phone*:
</font>
<!--webbot bot="Validation" s-display-name="Phone Number" b-value-required="TRUE" --><input name="MainPhone" type="text" id="Main Phone" size="14" /></font></td>
<td colspan="3"><font face="Arial"><font size="2">Alt Phone:
</font>
<input name="AltPhone" type="text" id="Alt Phone" size="17" /></font></td>
<td colspan="3"><font face="Arial"><font size="2">Date of Birth (mm/dd/yyyy):
</font>
<input name="DOB" type="text" id="DOB" size="6" /></font></td>
</tr>
<tr>
<td colspan="4"><font face="Arial"><font size="2">Email Address:
</font>
<input name="Email" type="text" id="Email" size="29" /></font></td>
<td colspan="3"><font face="Arial"><font size="2">Referred By:
</font>
<input name="ReferredBy" type="text" id="Referred" size="13" /></font></td>
</tr>
<tr>
<td colspan="3"><font face="Arial"><font size="2">Emergency Contact:
</font>
<input name="EmergencyContact" type="text" id="textfield13" size="18" /></font></td>
<td colspan="2"><font face="Arial"><font size="2">Relationship:
</font>
<input name="EmerContactRelation" type="text" id="textfield14" size="20" /></font></td>
<td colspan="2"><font face="Arial"><font size="2">Phone:
</font>
<input name="EmerRelationPhone" type="text" id="textfield15" size="9" /></font></td>
</tr>
<tr>
<td colspan="3"><font face="Arial" size="2">Seeking Permanent Employment:
</font> </td>
<td width="138"><label>
<font face="Arial">
<input type="radio" name="Permanent" value="yes" id="RadioGroup1_0" /><font size="2">
Yes</font></font></label><font size="2" face="Arial"> </font>
<label>
<font face="Arial">
<input type="radio" name="Permanent" value="no" id="RadioGroup1_1" /><font size="2">
No</font></font></label></td>
<td colspan="3"><font face="Arial"><font size="2">Available Days:
</font>
<input name="AvailPermDays" type="text" id="textfield16" size="13" /></font></td>
</tr>
<tr>
<td colspan="3"><font face="Arial" size="2">Seeking Temporary Situations:</font></td>
<td><label>
<font face="Arial">
<input type="radio" name="Temporary" value="yes" id="RadioGroup1_2" /><font size="2">
Yes</font></font></label><font size="2" face="Arial"> </font>
<label>
<font face="Arial">
<input type="radio" name="Temporary" value="no" id="RadioGroup1_3" /><font size="2">
No</font></font></label></td>
<td colspan="3"><font face="Arial"><font size="2">Available Days:
</font>
<input name="AvailTempDays" type="text" id="textfield17" size="14" /></font></td>
</tr>
<tr>
<td colspan="2"><font face="Arial"><font size="2">Available Start Date*:
</font>
<!--webbot bot="Validation" s-display-name="Available Start Date" b-value-required="TRUE" --><input name="AvailStateDate" type="text" id="textfield18" size="19" /></font></td>
<td colspan="5"><font face="Arial"><font size="2">Years of Experience in a Dental Office:
</font>
<input name="YrsExperience" type="text" id="textfield19" size="4" /></font></td>
</tr>
<tr>
<td colspan="7"><font face="Arial"><font size="2">Geographical Areas Willing to Work:
</font>
<input name="GeoAreaToWork" type="text" id="textfield20" size="34" /></font></td>
</tr>
<tr>
<td colspan="7"><font face="Arial"><font size="2">Is there an area or location in which you prefer NOT to work?
</font>
<input name="PreferNOTtoWork" type="text" id="textfield21" size="33" /></font></td>
</tr>
<tr>
<td colspan="4"><font face="Arial"><font size="2">School (& Location) attended:
</font>
<input name="SchoolAttended" type="text" id="textfield22" size="30" /></font></td>
<td colspan="3"><font face="Arial"><font size="2">Mo/Yr Graduated:
</font>
<input name="GradDate" type="text" id="textfield23" size="7" /></font></td>
</tr>
<tr>
<td colspan="7"><font face="Arial"><font size="2">License #*: </font>
<!--webbot bot="Validation" s-display-name="License Number" b-value-required="TRUE" --><input name="LicenseNo" type="text" id="textfield24" size="18" /></font></td>
</tr>
<tr>
<td colspan="7"><font face="Arial"><font size="2">Dental Software you have experience with:
</font>
<input name="SoftwareExper" type="text" id="textfield28" size="24" /></font></td>
</tr>
<tr>
<td colspan="7"><font face="Arial"><font size="2">Fluent Languages you speak other than English:
</font>
<input name="Language" type="text" id="textfield25" size="23" /></font></td>
</tr>
<tr>
<td colspan="7" valign="top"><font face="Arial"><font size="2">Comments:
</font>
<textarea name="Comments" cols="60" rows="3" id="textfield29"></textarea><font size="2">
<br>
</font></font></td>
</tr>
<tr>
<td colspan="7"><font face="Arial" size="2"><strong>**By typing your name below, you declare that, to the best of
your knowledge, the above information is true and accurate.</strong></font></td>
</tr>
<tr>
<td colspan="6"><font face="Arial"><font size="2">Digital Signature:
</font>
<input name="signature" type="text" id="textfield26" size="35" /></font></td>
<td width="344" valign="top"><font face="Arial"><font size="2">Date:
</font>
<input name="DateofSign" type="text" id="textfield27" size="16" /></font></td>
</tr>
<tr>
<td colspan="7">
<input type="checkbox" name="AgreeToContract" value="Yes, I agree">
<font face="Georgia, Times New Roman, Times, serif" size="3">I have read and agree to the terms of the
Employee Contract<br>
<font color="#FF0000"><b>ATTENTION: This entry must be checked in order
to validate order!</b></font></font>
<p><a href="Temporary-PermanentContract.html" target="_blank" onmouseover="MM_swapImage('contact','','assets/contractDOWN.png',1)" onmouseout="MM_swapImgRestore()"><img src="assets/contractUP.png" name="contact" width="150" height="40" border="0" id="contact" /></a></td>
</tr>
<tr><imput type="hidden" name="redirect" value="http://www.prohitlist.com/paypalEmployees.html">
<td colspan="7"><div align="center">
<font face="Arial">
<input type="submit" name="Submit" id="Submit" value="Submit" /><font size="2">
</font>
<input type="reset" name="Reset" id="Reset" value="Reset" /><font size="2">
</font></font>
</div></td>
</tr>
<tr>
<td colspan="7"><hr width="1000" /></td>
</tr>
</table>
</div>
</form>
<p> </p>
</body>
</html>
I have messed around with some of this to try several different solutions, some pieces may need to be deleted.
Thank you!!!!