Bornfree
06-04-2009, 11:00 PM
Hi Guys,
I'm working of a form and i have run into a few problems.
1. My form is not working in IE. Only working in Firefox.
2. I wish to have the fields marked by * as compulsory fields. I need a pop up saying they have to enter certain sections.
Below is the code that i currently have.
i also wish to do this to submit the form
Can it all work together?
<form action="process.php" method="post" id="contact_form" form name="formcheck" onsubmit="return formCheck(this);">
<input type="hidden" name="redirect" value="thankyou.htm" />
Thanks for all the help!
<script src="FormManager.js">
/****************************************************
* Form Dependency Manager- By Twey- http://www.twey.co.uk
* Visit Dynamic Drive for this script and more: http://www.dynamicdrive.com
****************************************************/
</script>
<script type="text/javascript">
window.onload = function() {
setupDependencies('weboptions'); //name of form(s). Seperate each with a comma (ie: 'weboptions', 'myotherform' )
};
</script>
<form action="" name="weboptions">
<p>
<label></label>
</p>
<table width="80%" border="0" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td bgcolor="#FFFFFF">Name:</td>
<td bgcolor="#FFFFFF"><input type="text" name="name" size="20" maxlength="20" />
* </td>
</tr>
<tr>
<td bgcolor="#FFFFFF">Email:</td>
<td bgcolor="#FFFFFF"><input type="text" name="email" size="50" maxlength="50" />
* </td>
</tr>
<tr>
<td bgcolor="#FFFFFF">Country:</td>
<td bgcolor="#FFFFFF"><input name="country" type="text" id="country" size="30" maxlength="30" />
* </td>
</tr>
<tr>
<td bgcolor="#FFFFFF">Subject:</td>
<td bgcolor="#FFFFFF"><input type="text" name="subject" size="30" maxlength="30" />
* </td>
</tr>
<tr>
<td colspan="2" bgcolor="#FFFFFF"><label>Individual
<input name="type" type="radio" value="individual" />
</label>
<label>Company
<input name="type" type="radio" value="company" />
</label>
<label></label></td>
</tr>
<tr>
<td colspan="2" bgcolor="#FFFFFF"><label> </label>
<label></label>
<label style="margin-bottom: 1em; padding-bottom: 1em; border-bottom: 3px silver groove;"></label>
<label></label>
<table width="484" border="0">
<tr>
<td><label style="margin-bottom: 1em; padding-bottom: 1em; border-bottom: 3px silver groove;">
<input name="hidden" type="hidden" class="DEPENDS ON type BEING individual OR type BEING company" />
</label>
<label>Company
<input name="company2" type="text" id="company2" class="DEPENDS ON type BEING company " />
</label></td>
</tr>
<tr>
<td><label>Address
<textarea name="address" cols="30" rows="1" class="DEPENDS ON type BEING company " id="address"></textarea></td>
</tr>
<tr>
<td><label>ASB Number (Australia Only)
<input name="asb" type="text" id="asb" class="DEPENDS ON type BEING company " />
</label>
<label></label>
<label></label></td>
</tr>
<tr>
<td><label></label>
<label>Request Price List
<input name="price" type="checkbox" id="price" value="price" class="DEPENDS ON type BEING company " />
</label>
<label></label>
<label></label></td>
</tr>
</table>
<label></label></td>
</tr>
<tr>
<td bgcolor="#FFFFFF">Your Comment:</td>
<td bgcolor="#FFFFFF"><textarea name="comment" cols="50" rows="10" id="comment"></textarea></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"><em>* Denotes required field</em><br />
<input type="submit" name="submit" value="Send" />
<input type="reset" name="Reset" value="Reset" /> </td>
</tr>
</table>
<p> </p>
</form>
I'm working of a form and i have run into a few problems.
1. My form is not working in IE. Only working in Firefox.
2. I wish to have the fields marked by * as compulsory fields. I need a pop up saying they have to enter certain sections.
Below is the code that i currently have.
i also wish to do this to submit the form
Can it all work together?
<form action="process.php" method="post" id="contact_form" form name="formcheck" onsubmit="return formCheck(this);">
<input type="hidden" name="redirect" value="thankyou.htm" />
Thanks for all the help!
<script src="FormManager.js">
/****************************************************
* Form Dependency Manager- By Twey- http://www.twey.co.uk
* Visit Dynamic Drive for this script and more: http://www.dynamicdrive.com
****************************************************/
</script>
<script type="text/javascript">
window.onload = function() {
setupDependencies('weboptions'); //name of form(s). Seperate each with a comma (ie: 'weboptions', 'myotherform' )
};
</script>
<form action="" name="weboptions">
<p>
<label></label>
</p>
<table width="80%" border="0" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td bgcolor="#FFFFFF">Name:</td>
<td bgcolor="#FFFFFF"><input type="text" name="name" size="20" maxlength="20" />
* </td>
</tr>
<tr>
<td bgcolor="#FFFFFF">Email:</td>
<td bgcolor="#FFFFFF"><input type="text" name="email" size="50" maxlength="50" />
* </td>
</tr>
<tr>
<td bgcolor="#FFFFFF">Country:</td>
<td bgcolor="#FFFFFF"><input name="country" type="text" id="country" size="30" maxlength="30" />
* </td>
</tr>
<tr>
<td bgcolor="#FFFFFF">Subject:</td>
<td bgcolor="#FFFFFF"><input type="text" name="subject" size="30" maxlength="30" />
* </td>
</tr>
<tr>
<td colspan="2" bgcolor="#FFFFFF"><label>Individual
<input name="type" type="radio" value="individual" />
</label>
<label>Company
<input name="type" type="radio" value="company" />
</label>
<label></label></td>
</tr>
<tr>
<td colspan="2" bgcolor="#FFFFFF"><label> </label>
<label></label>
<label style="margin-bottom: 1em; padding-bottom: 1em; border-bottom: 3px silver groove;"></label>
<label></label>
<table width="484" border="0">
<tr>
<td><label style="margin-bottom: 1em; padding-bottom: 1em; border-bottom: 3px silver groove;">
<input name="hidden" type="hidden" class="DEPENDS ON type BEING individual OR type BEING company" />
</label>
<label>Company
<input name="company2" type="text" id="company2" class="DEPENDS ON type BEING company " />
</label></td>
</tr>
<tr>
<td><label>Address
<textarea name="address" cols="30" rows="1" class="DEPENDS ON type BEING company " id="address"></textarea></td>
</tr>
<tr>
<td><label>ASB Number (Australia Only)
<input name="asb" type="text" id="asb" class="DEPENDS ON type BEING company " />
</label>
<label></label>
<label></label></td>
</tr>
<tr>
<td><label></label>
<label>Request Price List
<input name="price" type="checkbox" id="price" value="price" class="DEPENDS ON type BEING company " />
</label>
<label></label>
<label></label></td>
</tr>
</table>
<label></label></td>
</tr>
<tr>
<td bgcolor="#FFFFFF">Your Comment:</td>
<td bgcolor="#FFFFFF"><textarea name="comment" cols="50" rows="10" id="comment"></textarea></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"><em>* Denotes required field</em><br />
<input type="submit" name="submit" value="Send" />
<input type="reset" name="Reset" value="Reset" /> </td>
</tr>
</table>
<p> </p>
</form>