basils57
11-15-2007, 09:50 AM
Hi Folks
I'm having a real problem with posting a form, and would appreciate some help with my coding in DW8.
Currently the form a) won't post and b) won't clear the boxes when the 'clear' button is pressed. After the info has been submitted, the page is supposed to revert to 'thankyou.html' in the same directory.
I've loaded up the actions etc advised by my host company.
I don't know whether I'm doing right, but I'm listing the relevant code from my page below:
<!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"><!-- InstanceBegin template="Templates/main.dwt" codeOutsideHTMLIsLocked="false" -->
<!-- DW6 -->
<head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<!-- InstanceBeginEditable name="doctitle" -->
<title>Contact Direct Safety Solutions Ltd</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="mm_health_nutr.css" type="text/css" />
<script language="JavaScript" type="text/javascript">
//--------------- LOCALIZEABLE GLOBALS ---------------
var d=new Date();
var monthname=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
//Ensure correct for language. English is "January 1, 2004"
var TODAY = monthname[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear();
//--------------- END LOCALIZEABLE ---------------
</script>
<style type="text/css">
<!--
.style2 {color: #993330}
-->
</style>
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
<link href="dss.css" rel="stylesheet" type="text/css" />
</head>
<body bgcolor="#F4FFE4">
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
<tr bgcolor="#D5EDB3">
<td colspan="3" rowspan="2" valign="middle" bgcolor="#D5EDB3"><img src="images/baselogo110acv5.png" alt="header" width="874" height="114" /></td>
<td colspan="3" rowspan="2" align="center" valign="bottom" nowrap="nowrap" bgcolor="#d5edb3" id="logo"><p> </p>
<p class="pageName style2"> </p></td>
<td width="4" height="50"> </td>
</tr>
<tr bgcolor="#D5EDB3">
<td width="4" height="51"> </td>
</tr>
<tr>
<td colspan="7" bgcolor="#5C743D"><img src="mm_spacer.gif" alt="" width="1" height="2" border="0" /></td>
</tr>
<tr>
<td colspan="7" bgcolor="#99CC66" background="mm_dashed_line.gif"><img src="mm_dashed_line.gif" alt="line decor" width="4" height="3" border="0" /></td>
</tr>
<tr bgcolor="#99CC66">
<td colspan="7" id="dateformat" height="20"> <script language="JavaScript" type="text/javascript">
document.write(TODAY); </script> </td>
</tr>
<tr>
<td colspan="7" bgcolor="#99CC66" background="mm_dashed_line.gif"><img src="mm_dashed_line.gif" alt="line decor" width="4" height="3" border="0" /></td>
</tr>
<tr>
<td colspan="7" bgcolor="#5C743D"><img src="mm_spacer.gif" alt="" width="1" height="2" border="0" /></td>
</tr>
<tr>
<td width="165" valign="top" bgcolor="#5C743D">
<table border="0" cellspacing="0" cellpadding="0" width="165" id="navigation">
<tr>
<td width="165"> <br />
<br /></td>
</tr>
<tr>
<td width="165"><a href="index.html" class="navText">home</a></td>
</tr>
<tr>
<td width="165"><a href="benefits.html" class="navText">how we can benefit your business</a></td>
</tr>
<tr>
<td width="165"><a href="action.html" class="navText">how we achieve results</a></td>
</tr>
<tr>
<td width="165"><a href="consultants.html" class="navText">our consultants </a></td>
</tr>
<tr>
<td width="165"><a href="samples.html" class="navText">sample documents </a></td>
</tr>
<tr>
<td width="165"><a href="subscribe.html" class="navText">subscribe </a></td>
</tr>
<td width="165"><a href="javascript:;" class="navText">members area </a></td>
</tr>
<td width="165"><a href="contact.html" class="navText">contact us </a></td>
</tr>
</table>
<br />
<table width="140" border="0" align="center" cellpadding="0">
<tr>
<td> </td>
<td rowspan="3"><img src="images/110_sfs10.gif" alt="Safety Starts Here Sign" width="110" height="164" /></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
<div align="center"><br />
<br />
<br />
</div></td>
<td width="50"><img src="mm_spacer.gif" alt="" width="50" height="1" border="0" /></td>
<td colspan="4" valign="top"><!-- InstanceBeginEditable name="body" --><img src="mm_spacer.gif" alt="" width="405" height="1" border="0" /><br />
<br />
<br />
<table border="0" cellspacing="0" cellpadding="0" width="682">
<tr>
<td colspan="2" class="bodyText"><p><span class="pageName">CONTACT US <br />
</span><br />
Contact us using the form below, including any questions or comments that you may have. </p>
<p>Please fill in all applicable details and click the 'Send Enquiry' button to send your request/enquiry to us. </p> </td>
</tr>
<tr>
<td width="276" valign="top" class="bodyText"><form id="form6" name="form6" method="post" action="">
<label for="label">Name*<br />
</label>
<input name="textfield2" type="text" id="label" tabindex="11" size="30" />
<label for="name"><br />
<br />
</label>
<label for="label2">Email*<br />
</label>
<input name="textfield3" type="text" id="label2" tabindex="31" size="30" />
<p>
<label for="label3">Telephone*<br />
</label>
<input name="textfield4" type="text" id="label3" tabindex="61" size="30" />
</p>
<p>
<label for="label5">No. of Employees*<br />
</label>
<input name="textfield6" type="text" id="label5" tabindex="71" size="10" /></p>
</form>
<label for="name"></label>
<p> </p> </td>
<td width="406" valign="top" class="bodyText"><form id="form4" name="form4" method="post" action="">
<label for="company"> Company*</label>
<br />
<input name="company" type="password" id="company" tabindex="21" size="40" />
<p>
<label for="textfield">Address<br />
</label>
<textarea name="textfield" cols="30" rows="5" id="textfield" tabindex="41"></textarea>
</p>
<p>
<label for="label4">Postcode</label>
<br />
<input type="text" name="textfield5" tabindex="51" id="label4" /><label for="textfield"></label></p>
</form> </td>
</tr>
<tr>
<td colspan="2" class="bodyText">
<form action="http://www.directsafetysolutions.co.uk/cgi-sys/formmail.pl" method="post">
<input type="hidden" name="recipient" value="info@directsafetysolutions.co.uk" />
<label for="label6">Any additional enquiries or comments</label>
<br />
<textarea name="textfield7" cols="60" rows="8" id="label6"></textarea>
</form> </td>
</tr>
<tr>
<td colspan="2" class="bodyText"><br />
<input name="Submit" type="submit" class="bodyTextStrong" tabindex="91" value="Submit Enquiry" />
<input type="hidden" name="redirect" value="http://www.directsafetysolutions.co.uk/thankyou.html">
<input name="Submit2" type="reset" class="bodyTextStrong" tabindex="101" value="Clear Form" /></td>
</tr>
<tr>
<td colspan="2" class="bodyText"><br />
<span class="bodyTextStrong">* = Mandatory fields that need to be filled in</span></td>
</tr>
</table>
<div align="center"><span class="smallText">Total Contents copyright © 2007 Direct Safety Solutions Ltd <br />
</span><br />
</div>
<img src="mm_spacer.gif" alt="" width="50" height="1" border="0" /><br />
<br />
<!-- InstanceEndEditable --></td>
<td width="4"> </td>
</tr>
<tr>
<td width="165"> </td>
<td width="50"> </td>
<td width="659"> </td>
<td width="50"> </td>
<td width="39"> </td>
<td width="149"> </td>
<td width="4"> </td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>
I'm having a real problem with posting a form, and would appreciate some help with my coding in DW8.
Currently the form a) won't post and b) won't clear the boxes when the 'clear' button is pressed. After the info has been submitted, the page is supposed to revert to 'thankyou.html' in the same directory.
I've loaded up the actions etc advised by my host company.
I don't know whether I'm doing right, but I'm listing the relevant code from my page below:
<!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"><!-- InstanceBegin template="Templates/main.dwt" codeOutsideHTMLIsLocked="false" -->
<!-- DW6 -->
<head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<!-- InstanceBeginEditable name="doctitle" -->
<title>Contact Direct Safety Solutions Ltd</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="mm_health_nutr.css" type="text/css" />
<script language="JavaScript" type="text/javascript">
//--------------- LOCALIZEABLE GLOBALS ---------------
var d=new Date();
var monthname=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
//Ensure correct for language. English is "January 1, 2004"
var TODAY = monthname[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear();
//--------------- END LOCALIZEABLE ---------------
</script>
<style type="text/css">
<!--
.style2 {color: #993330}
-->
</style>
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
<link href="dss.css" rel="stylesheet" type="text/css" />
</head>
<body bgcolor="#F4FFE4">
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
<tr bgcolor="#D5EDB3">
<td colspan="3" rowspan="2" valign="middle" bgcolor="#D5EDB3"><img src="images/baselogo110acv5.png" alt="header" width="874" height="114" /></td>
<td colspan="3" rowspan="2" align="center" valign="bottom" nowrap="nowrap" bgcolor="#d5edb3" id="logo"><p> </p>
<p class="pageName style2"> </p></td>
<td width="4" height="50"> </td>
</tr>
<tr bgcolor="#D5EDB3">
<td width="4" height="51"> </td>
</tr>
<tr>
<td colspan="7" bgcolor="#5C743D"><img src="mm_spacer.gif" alt="" width="1" height="2" border="0" /></td>
</tr>
<tr>
<td colspan="7" bgcolor="#99CC66" background="mm_dashed_line.gif"><img src="mm_dashed_line.gif" alt="line decor" width="4" height="3" border="0" /></td>
</tr>
<tr bgcolor="#99CC66">
<td colspan="7" id="dateformat" height="20"> <script language="JavaScript" type="text/javascript">
document.write(TODAY); </script> </td>
</tr>
<tr>
<td colspan="7" bgcolor="#99CC66" background="mm_dashed_line.gif"><img src="mm_dashed_line.gif" alt="line decor" width="4" height="3" border="0" /></td>
</tr>
<tr>
<td colspan="7" bgcolor="#5C743D"><img src="mm_spacer.gif" alt="" width="1" height="2" border="0" /></td>
</tr>
<tr>
<td width="165" valign="top" bgcolor="#5C743D">
<table border="0" cellspacing="0" cellpadding="0" width="165" id="navigation">
<tr>
<td width="165"> <br />
<br /></td>
</tr>
<tr>
<td width="165"><a href="index.html" class="navText">home</a></td>
</tr>
<tr>
<td width="165"><a href="benefits.html" class="navText">how we can benefit your business</a></td>
</tr>
<tr>
<td width="165"><a href="action.html" class="navText">how we achieve results</a></td>
</tr>
<tr>
<td width="165"><a href="consultants.html" class="navText">our consultants </a></td>
</tr>
<tr>
<td width="165"><a href="samples.html" class="navText">sample documents </a></td>
</tr>
<tr>
<td width="165"><a href="subscribe.html" class="navText">subscribe </a></td>
</tr>
<td width="165"><a href="javascript:;" class="navText">members area </a></td>
</tr>
<td width="165"><a href="contact.html" class="navText">contact us </a></td>
</tr>
</table>
<br />
<table width="140" border="0" align="center" cellpadding="0">
<tr>
<td> </td>
<td rowspan="3"><img src="images/110_sfs10.gif" alt="Safety Starts Here Sign" width="110" height="164" /></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
<div align="center"><br />
<br />
<br />
</div></td>
<td width="50"><img src="mm_spacer.gif" alt="" width="50" height="1" border="0" /></td>
<td colspan="4" valign="top"><!-- InstanceBeginEditable name="body" --><img src="mm_spacer.gif" alt="" width="405" height="1" border="0" /><br />
<br />
<br />
<table border="0" cellspacing="0" cellpadding="0" width="682">
<tr>
<td colspan="2" class="bodyText"><p><span class="pageName">CONTACT US <br />
</span><br />
Contact us using the form below, including any questions or comments that you may have. </p>
<p>Please fill in all applicable details and click the 'Send Enquiry' button to send your request/enquiry to us. </p> </td>
</tr>
<tr>
<td width="276" valign="top" class="bodyText"><form id="form6" name="form6" method="post" action="">
<label for="label">Name*<br />
</label>
<input name="textfield2" type="text" id="label" tabindex="11" size="30" />
<label for="name"><br />
<br />
</label>
<label for="label2">Email*<br />
</label>
<input name="textfield3" type="text" id="label2" tabindex="31" size="30" />
<p>
<label for="label3">Telephone*<br />
</label>
<input name="textfield4" type="text" id="label3" tabindex="61" size="30" />
</p>
<p>
<label for="label5">No. of Employees*<br />
</label>
<input name="textfield6" type="text" id="label5" tabindex="71" size="10" /></p>
</form>
<label for="name"></label>
<p> </p> </td>
<td width="406" valign="top" class="bodyText"><form id="form4" name="form4" method="post" action="">
<label for="company"> Company*</label>
<br />
<input name="company" type="password" id="company" tabindex="21" size="40" />
<p>
<label for="textfield">Address<br />
</label>
<textarea name="textfield" cols="30" rows="5" id="textfield" tabindex="41"></textarea>
</p>
<p>
<label for="label4">Postcode</label>
<br />
<input type="text" name="textfield5" tabindex="51" id="label4" /><label for="textfield"></label></p>
</form> </td>
</tr>
<tr>
<td colspan="2" class="bodyText">
<form action="http://www.directsafetysolutions.co.uk/cgi-sys/formmail.pl" method="post">
<input type="hidden" name="recipient" value="info@directsafetysolutions.co.uk" />
<label for="label6">Any additional enquiries or comments</label>
<br />
<textarea name="textfield7" cols="60" rows="8" id="label6"></textarea>
</form> </td>
</tr>
<tr>
<td colspan="2" class="bodyText"><br />
<input name="Submit" type="submit" class="bodyTextStrong" tabindex="91" value="Submit Enquiry" />
<input type="hidden" name="redirect" value="http://www.directsafetysolutions.co.uk/thankyou.html">
<input name="Submit2" type="reset" class="bodyTextStrong" tabindex="101" value="Clear Form" /></td>
</tr>
<tr>
<td colspan="2" class="bodyText"><br />
<span class="bodyTextStrong">* = Mandatory fields that need to be filled in</span></td>
</tr>
</table>
<div align="center"><span class="smallText">Total Contents copyright © 2007 Direct Safety Solutions Ltd <br />
</span><br />
</div>
<img src="mm_spacer.gif" alt="" width="50" height="1" border="0" /><br />
<br />
<!-- InstanceEndEditable --></td>
<td width="4"> </td>
</tr>
<tr>
<td width="165"> </td>
<td width="50"> </td>
<td width="659"> </td>
<td width="50"> </td>
<td width="39"> </td>
<td width="149"> </td>
<td width="4"> </td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>