PDA

View Full Version : Submit Popup Thank you



Slither
05-08-2007, 02:36 PM
Ok so I finally got my code figured out thanks to you guys for emailing me the required info...but now I would like to add a small pop up that thanks the user for submitting their information. Here is my code in the reduced version so it will fit on here. Where and how would I put that in my code to thank them after they click submit?




<script>
function validateForm() {
with (document.SMR) {
var alertMsg = "Please look back and fill in these required fields:\n";
if (NAME.value == "") alertMsg += "\nName";
if (CITY.value == "") alertMsg += "\nCity";
if (EMAIL.value == "") alertMsg += "\nE-Mail";
if (STATE.options[STATE.selectedIndex].value == "") alertMsg += "\nState";
if (MODEL_YEAR.options[MODEL_YEAR.selectedIndex].value == "") alertMsg += "\nModel Year";
if (MODEL_TYPE.options[MODEL_TYPE.selectedIndex].value == "") alertMsg += "\nModel Type";
if (BODY_COLOR.value == "") alertMsg += "\nBODY_COLOR";
if (BODY_STYLE.options[BODY_STYLE.selectedIndex].value == "") alertMsg += "\nBody Style";
if (TRANSMISSION.value == "") alertMsg += "\nTransmission";
if (INTERIOR_TYPE.value == "") alertMsg += "\nInterior Type";
if (INTERIOR_COLOR.value == "") alertMsg += "\nInterior Color";
if (BODY_STYLE.options[BODY_STYLE.selectedIndex].value == "Convertible" &&
TOP_COLOR.selectedIndex == 0)
alertMsg += "\nTop Color is Required for Convertibles";


if (alertMsg != "Please look back and fill in these required fields:\n") {
alert(alertMsg);
return false;
} else {
return true;
} } }

</script>



<style>
.regheader {
text-align: right;
font-weight: bold;
font-family: "Times New Roman";
color: #000000;
width: 45&#37;;
}

</style>
</head>
<body bgcolor="#ffffff" link="#800000" vlink="#996600" text="#000000" topmargin=0 leftmargin=0>
<table>
<tr>

<td>
</table>

<form enctype="text/plain" method="post" action="mailto:mahnotinknee@yahoo.com">
<table border="0" width=550 height=300>
<tr valign="top">


</tr>
</table>
<br />
<a name="Silver Mustang Registry"></a>
<table bordercolor="black" width="500" align="center">
<tr bgcolor="black">

</tr>
<tr>
<td colspan="2"><font face="Times New Roman" color=#000000 size=4><font color="blue">Personal Information:</font></td>
</tr>
<tr>
<td class="regheader" ></font>First, Last Name:</td>
<td><input name="NAME" maxlength=75 size=44 type="text" value=""></td>

</tr>
<tr>
<td class="regheader" >Registered User Name:</td>
<td><input name="ADDRESS" maxlength=50 size=44 type="text" value=""></td>
</tr>
<tr>
<td class="regheader"></font>City:</td>

<td><input name="CITY" maxlength=75 size=20 type="text" value=""></td>
</tr>
<tr>
<td class="regheader"></font>State: </td>
<td><select name="STATE" size="1" >
<option style="color: RED; font-weight:bold" value="" SELECTED >Select State</option>
<option value="--" >Other</option>
<option value="AK" >AK</option>

<option value="AL" >AL</option>
<option value="AR" >AR</option>
<option value="AZ" >AZ</option>
<option value="CA" >CA</option>
<option value="CO" >CO</option>
</select>
</td>
</tr>
<tr>
<td class="regheader"></font>Zip: </td>

<td><input name="ZIP" maxlength=10 size=6 type="text" value=""></td>
</tr>
<tr>
<td class="regheader"></font>Country:</td>
<td><input name="COUNTRY" maxlength=50 size=35 type="text" value="USA"></td>
</tr>
<tr>
<td colspan="2"><font face="Times New Roman" color=#000000 size=4><font color="blue">Car Information:</font></font></td>

</tr>
<tr>
<td class="regheader"><font face="Times New Roman" color=#000000 size=3></font>Year:</font>&nbsp;</td>
<td><select name="MODEL_YEAR" size="1" >
<option style="color: RED; font-weight:bold" value="" SELECTED >Select Year</option>
<option value="2008" >2008</option>
<option value="2007" >2007</option>
<option value="2006" >2006</option>

<option value="2005" >2005</option>
<option value="2004" >2004</option>
<option value="2003" >2003</option>
<option value="2002" >2002</option>
<option value="2001" >2001</option>
<option value="2000" >2000</option>
<option value="Other" >Specify other in Comments</option>
</select>
</td>
</tr>
<tr>
<td class="regheader"><font face="Times New Roman" color=#000000 size=3></font>Model: </td>
<td><select name="MODEL_TYPE" size="1" >

<option style="color: RED; font-weight:bold" value="" SELECTED >Select Model</option>
<option value="GT" >GT</option>
<option value="V6" >V6</option>
<option value="Cobra" >Cobra</option>
<option value="Mach 1" >Mach 1</option>
<option value="Roush" >Roush</option>
<option value="Saleen" >Saleen</option>
<option value="Boss" >Boss</option>
<option value="GTS" >GTS</option>
<option value="LX" >LX</option>
<option value="5.0 LX" >5.0 LX</option>
<option value="Other" >Specify other in Comments</option>
</select>
</td>
</tr>
<tr>
<td class="regheader"><font face="Times New Roman" color=#000000 size=3></font>Body Style:</td>
<td>

<select name="BODY_STYLE" size="1" >
<option style="color: RED; font-weight:bold" value="" SELECTED >Select Body Style</option>
<option value="Coupe" >Coupe</option>
<option value="Convertible" >Convertible</option>
<option value="Fastback" >Fastback</option>
<option value="Hatchback" >Hatchback</option>
</select>
</td>
</tr>

<td class="regheader"><font face="Times New Roman" color=#000000 size=3>&nbsp; Convertible Top Color</font></font></font></b><br />

</td>
<td><select name="TOP_COLOR" size="1" >
<option style="color: RED; font-weight:bold" value="" SELECTED >Select Top Color</option>
<option value="Black" >Black</option>
<option value="White" >White</option>
<option value="Tan" >Tan</option>
</select>

</td>
</tr>
<tr>
<td class="regheader"><font face="Times New Roman" color=#000000 size=3><b></font>Transmission:</td>
<td><select name="TRANSMISSION" size="1" >
<option style="color: RED; font-weight:bold" value="" SELECTED >Select Transmission</option>
<option value="Manual" >Manual</option>
<option value="Auto" >Automatic</option>

</select>
</td>
</tr>
<tr>
<td class="regheader"><font face="Times New Roman" color=#000000 size=3></font>Seat Material:</td>
<td><select name="INTERIOR_TYPE" size="1" >
<option style="color: RED; font-weight:bold" value="" SELECTED >Select Material</option>
<option value="Leather" >Leather</option>
<option value="Cloth" >Cloth</option>
<option value="Vinyl" >Vinyl</option>
<option value="Comfortweave" >Comfortweave</option>
<option value="Other" >Specify other in Comments</option>
</select>
</td>
</tr>
<tr>
<td class="regheader"><font face="Times New Roman" color=#000000 size=3></font>Interior Color:</font></td>
<td><select name="INTERIOR_COLOR" size="1" >

<option style="color: RED; font-weight:bold" value="" SELECTED >Select Color</option>
<option value="Black" >Black</option>
<option value="Charcoal" >Dark Charcoal</option>
<option value="White" >White</option>
<option value="Grey" >Light Grey</option>
<option value="Blue" >Blue</option>
<option value="Red" >Red</option>
<option value="Other" >Specify other in Comments</option>
</select>

</td>

<tr>
<td class="regheader"></font><font face="Times New Roman" color=#000000 size=3>VIN # (Optional):</td>

<td><input name="VIN" maxlength=25 size=30 type="text" value=""></td>
</tr>

<tr>
<td class="regheader"><font face="Times New Roman" color=#000000 size=3>&nbsp; If "Other" was selected, please specify:</b></font></td>

<td><textarea name="COMMENTS" rows=7 cols=35></textarea></td>
</tr>
<tr>
<td colspan="2"><center><input value="Submit" type="submit"></center></td>
</tr>
</table>
</td>
</tr>

</table>
</form>
</body>


</code>
Thanks Edit/Delete Message

tech_support
05-09-2007, 06:38 AM
<script type="text/javascript">
var thanksmessage = "Thanks for entering this form!"
function validateForm() {
with (document.SMR) {
var alertMsg = "Please look back and fill in these required fields:\n";
if (NAME.value == "") alertMsg += "\nName";
if (CITY.value == "") alertMsg += "\nCity";
if (EMAIL.value == "") alertMsg += "\nE-Mail";
if (STATE.options[STATE.selectedIndex].value == "") alertMsg += "\nState";
if (MODEL_YEAR.options[MODEL_YEAR.selectedIndex].value == "") alertMsg += "\nModel Year";
if (MODEL_TYPE.options[MODEL_TYPE.selectedIndex].value == "") alertMsg += "\nModel Type";
if (BODY_COLOR.value == "") alertMsg += "\nBODY_COLOR";
if (BODY_STYLE.options[BODY_STYLE.selectedIndex].value == "") alertMsg += "\nBody Style";
if (TRANSMISSION.value == "") alertMsg += "\nTransmission";
if (INTERIOR_TYPE.value == "") alertMsg += "\nInterior Type";
if (INTERIOR_COLOR.value == "") alertMsg += "\nInterior Color";
if (BODY_STYLE.options[BODY_STYLE.selectedIndex].value == "Convertible" &&
TOP_COLOR.selectedIndex == 0)
alertMsg += "\nTop Color is Required for Convertibles";


if (alertMsg != "Please look back and fill in these required fields:\n") {
alert(alertMsg);
return false;
} else {
alert(thanksmessage)
return true;
} } }

</script>