Results 1 to 3 of 3

Thread: need help in this form

  1. #1
    Join Date
    Jan 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default need help in this form

    hi
    i made this form with validations but i dunno it doesn't work when i click on submit it shows me error i dunno y. I want to make an submit.html page and when somone clicks on it so it'll goto this page.
    i am posting the code so plz plz plz fix this or if in case u don't able to fix it so can u make me with the same fields and layout
    plz plz
    code:
    HTML Code:
    <html>
    
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Family/Surname</title>
    </head>
    
    <body>
    
    <div align="center">
    
    <table cellSpacing="0" cellPadding="0" width="795" border="0" id="table1">
    	<tr>
    		<td colSpan="2">
    		<table cellSpacing="0" cellPadding="0" width="796" border="0" id="table2">
    			<tr>
    				<td class="inttext" vAlign="top" width="635" bgColor="#eeeeee">
    				<div class="componentheading">
    &nbsp;</div>
    				<!-- Form Data Goes Here -->
    				<div align="center">
    					<table cellSpacing="0" cellPadding="0" border="0" id="table3" width="733">
    						<form name="contactform" method="post" action="/submit.html">
    								<input type="hidden" value=" " name="subject">
    								<tr>
    								<td colspan="8">
    								<p align="center">
    								<img border="0" src="utm.jpg" width="726" height="60"></td>
    							</tr>
    								<tr>
    								<td width="129">&nbsp;</td>
    								<td colspan="7">&nbsp;</td>
    							</tr>
    							<tr>
    								<td class="bodytext" vAlign="top" width="129">
    								<font size="2">&nbsp;Family/Surname</font></td>
    								<td class="bodytext" vAlign="top" align="left" colspan="4">
    								<input id="first_name" tabIndex="1" size="15" name="required_first"></td>
    								<td class="bodytext" vAlign="top" align="left" width="209" colspan="2">
    								<font size="2">Student #</font></td>
    								<td class="bodytext" vAlign="top" align="left" width="150">
    								<!--webbot bot="Validation" s-data-type="Number" s-number-separators=",." --><input id="first_name0" tabIndex="1" size="15" name="required_first0"></td>
    							</tr>
    							<tr>
    								<td class="bodytext" width="129"><font size="2">&nbsp;Given Names</font></td>
    								<td class="bodytext" align="left" colspan="4">
    								<input type="hidden" value="Rahall" name="campaign">
    								<input id="first_name1" tabIndex="1" size="15" name="required_first1"></td>
    								<td class="bodytext" align="left" width="209" colspan="2">
    								<font size="2">Former name (if applicable)</font></td>
    								<td class="bodytext" align="left" width="150">
    								<input id="first_name2" tabIndex="1" size="15" name="required_first2"></td>
    							</tr>
    							<tr>
    								<td class="bodytext" colspan="8"><i>
    								<font size="2">&nbsp;<br>
    								If you have changed your name since your last 
    								activation, please complete a Change of Name 
    								form at the office of the Registrar.<br>
    &nbsp;</font></i></td>
    							</tr>
    							<tr>
    								<td class="bodytext" width="129"><font size="2">Current Address</font></td>
    								<td class="bodytext" align="left" colspan="4">
    								<input id="last_name" tabIndex="2" size="15" name="required_last"></td>
    								<td class="bodytext" align="left" width="209" colspan="2">
    								<font size="2">Apt.</font></td>
    								<td class="bodytext" align="left" width="150">
    								<input id="first_name3" tabIndex="1" size="15" name="required_first3"></td>
    							</tr>
    							<tr>
    								<td class="bodytext" width="129">
    								<label for="street_address"><font size="2">City</font></label></td>
    								<td class="bodytext" align="left" colspan="4">
    								<input id="street_address" tabIndex="3" size="30" name="required_address"></td>
    								<td class="bodytext" align="left" width="209" colspan="2">
    								<font size="2">Province</font></td>
    								<td class="bodytext" align="left" width="150">
    								<input id="first_name4" tabIndex="1" size="15" name="required_first4"></td>
    							</tr>
    							<tr>
    								<td class="bodytext" width="129">
    								<label for="city"><font size="2">Postal Code</font></label></td>
    								<td class="bodytext" align="left" colspan="4">
    								<input id="city" tabIndex="4" name="required_city"></td>
    								<td class="bodytext" align="left" width="209" colspan="2">
    								<font size="2">Phone Number</font></td>
    								<td class="bodytext" align="left" width="150">
    								<input id="first_name5" tabIndex="1" size="15" name="required_first5"></td>
    							</tr>
    							<tr>
    								<td class="bodytext" width="129"><font size="2">Email Address</font></td>
    								<td class="bodytext" align="left" colspan="4">
    								<input id="first_name6" tabIndex="1" size="15" name="required_first6"></td>
    								<td class="bodytext" align="left" width="209" colspan="2">
    								<font size="2">Date Of Birth</font></td>
    								<td class="bodytext" align="left" width="150">
    								<input id="first_name7" tabIndex="1" size="15" name="required_first7" value="mm/dd/yy"></td>
    							</tr>
    							<tr>
    								<td class="bodytext" width="129"><font size="2">&nbsp;Sex</font></td>
    								<td class="bodytext" align="left" width="26">
    								<input type="radio" value="V1" name="R1"></td>
    								<td class="bodytext" align="left" width="109">
    								<font size="2">Male</font></td>
    								<td class="bodytext" align="left" width="26">
    								<input type="radio" value="V2" name="R1" checked></td>
    								<td class="bodytext" align="left" width="111">
    								<font size="2">Female</font></td>
    								<td class="bodytext" align="left" width="209" colspan="2">
    								<font size="2">Marital Status</font></td>
    								<td class="bodytext" align="left" width="150">
    								<select tabIndex="0" name="required_prefix0">
    <option value selected="Single">Single</option>
    <option value="Married">Married</option>
    <option value="Other">Other</option>
    </select></td>
    							</tr>
    							<tr>
    								<td class="bodytext" width="129">
    								<font size="2">&nbsp;Country of Citizenship</font></td>
    								<td class="bodytext" align="left" colspan="4">
    								<select size="1" name="D1">
    								<option selected value="Canada">Canada</option>
    								<option value="Pakistan">Pakistan</option>
    								<option value="India">India</option>
    								<option value="Kenya">Kenya</option>
    								</select></td>
    								<td class="bodytext" align="left" colspan="2">
    								<font size="2">Status in Canada</font></td>
    								<td class="bodytext" align="left">
    								<select tabIndex="0" name="required_prefix1">
    <option value selected>None</option>
    <option value selected="Canadian Citizen">Canadian Citizen</option>
    <option value="Permanent Resident">Permanent Resident</option>
    <option value="Visa">Visa</option>
    </select></td>
    							</tr>
    							<tr>
    								<td vAlign="top" width="129">
    								<font size="2">Enroll in Session</font></td>
    								<td align="left" colspan="5">
    								<select tabIndex="0" name="required_prefix2">
    <option value selected="May">May</option>
    <option value="July">July</option>
    <option value="September">September</option>
    <option value="January">January</option>
    </select></td>
    								<td align="left" width="181">
    								<font size="2">Last Session</font></td>
    								<td align="left">
    								<select tabIndex="0" name="required_prefix3">
    <option value selected="May">May</option>
    <option value="July">July</option>
    <option value="September">September</option>
    <option value="January">January</option>
    </select></td>
    							</tr>
    							<tr>
    								<td class="bodytext" vAlign="top" width="129" height="38">
    								<font size="2">Degree already received from U of 
    								T</font></td>
    								<td align="center" colspan="7" height="38">
    								<table border="0" width="100%" id="table4">
    									<tr>
    										<td width="20">
    								<input type="radio" value="V3" name="R1"></td>
    										<td><font size="2">Yes</font></td>
    										<td width="20">
    								<input type="radio" value="V4" name="R1"></td>
    										<td width="194"><font size="2">No</font></td>
    										<td width="178"><font size="2">If Yes 
    										please specify</font></td>
    										<td width="146">
    								<input id="first_name8" tabIndex="1" size="13" name="required_first8"></td>
    									</tr>
    								</table>
    								</td>
    							</tr>
    							<tr>
    								<td class="bodytext" vAlign="top" width="129" height="19">
    								&nbsp;</td>
    								<td align="left" colspan="7" height="19">
    								<table border="0" width="100%" id="table5">
    									<tr>
    										<td width="20">
    										<input type="checkbox" name="C1" value="ON"></td>
    										<td><i><font size="2">I certify that all 
    										the statements on this application are 
    										correct and complete. I understand that 
    										otherwise <br>
    										my re-registration in the faculty may be 
    										rescinded.</font></i></td>
    									</tr>
    								</table>
    								</td>
    							</tr>
    							<tr>
    								<td class="bodytext" vAlign="top" width="129" height="83">
    								<font size="2">
    								<br>
    								&nbsp;</font></td>
    								<td align="left" colspan="7" height="83">
    								<center>
    								<input style="float: left" onclick="javascript:validateForm()" tabIndex="12" type="button" value="Submit"></center>
    		</td>
    							</tr>
    						</form>
    					</table>
    				</div>
    				</td>
    			</tr>
    		</table>
    		</td>
    	</tr>
    </table>
    </div>
    
    </body>
    
    </html>

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    http://www.tele-pro.co.uk/scripts/contact_form/
    You'll probably want the PHP version.

  3. #3
    Join Date
    Jan 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    dude here's the new coding but still doesn't work
    whats wrong with programming
    plz chk it
    HTML Code:
    <html>
    
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>UTM Form</title>
    <script type="text/javascript">
    
    <!--
    
    function validate_form ( )
    {
    	valid = true;
    
            if ( document.utm_form.f_name.value == "" )
            {
                    alert ( "Please fill in the 'Your Name' box." );
                    valid = false;
            }
    
            if ( document.utm_form.student.value == "" )
            {
                    alert ( "Please fill in the 'Your Name' box." );
                    valid = false;
            }
            
                    if ( document.utm_form.g_name.value == "" )
            {
                    alert ( "Please fill in the 'Your Name' box." );
                    valid = false;
            }
            
                    if ( document.utm_form.fr_name.value == "" )
            {
                    alert ( "Please fill in the 'Your Name' box." );
                    valid = false;
            }
            
                    if ( document.utm_form.c_address.value == "" )
            {
                    alert ( "Please fill in the 'Your Name' box." );
                    valid = false;
            }
            
                    if ( document.utm_form.apt.value == "" )
            {
                    alert ( "Please fill in the 'Your Name' box." );
                    valid = false;
            }
            
                    if ( document.utm_form.city.value == "" )
            {
                    alert ( "Please fill in the 'Your Name' box." );
                    valid = false;
            }
            
                    if ( document.utm_form.province.value == "" )
            {
                    alert ( "Please fill in the 'Your Name' box." );
                    valid = false;
            }
            
                    if ( document.utm_form.p_code.value == "" )
            {
                    alert ( "Please fill in the 'Your Name' box." );
                    valid = false;
            }
            
                     if ( document.utm_form.p_number.value == "" )
            {
                    alert ( "Please fill in the 'Your Name' box." );
                    valid = false;
            }
            
                     if ( document.utm_form.e_address.value == "" )
            {
                    alert ( "Please fill in the 'Your Name' box." );
                    valid = false;
            }
            
                     if ( document.utm_form.dob.value == "" )
            {
                    alert ( "Please fill in the 'Your Name' box." );
                    valid = false;
            }
            
            if ( ( document.utm_form.gender[0].checked == false ) && ( document.utm_form.gender[1].checked == false ) )
            {
                    alert ( "Please choose your Gender: Male or Female" );
                    valid = false;
            }
    
      if ( ( document.utm_form.degree[0].checked == false ) && ( document.utm_form.degree[1].checked == false ) )
            {
                    alert ( "Received Degree: Yes or No" );
                    valid = false;
            }
            
            if ( document.utm_form.marital_status.selectedIndex == 0 )
            {
                    alert ( "Please select your Age." );
                    valid = false;
            }
    
            if ( document.utm_form.terms.checked == false )
            {
                    alert ( "Please check the Terms & Conditions box." );
                    valid = false;
    
    
            return valid;
    }
    
    //-->
    
    </script>
    
    </head>
    
    <body>
    <form name="utm_form" method="post" action="http://www.elated.com/cgi-bin/articles/development/javascript/form-validation-with-javascript/contact_complex.cgi" onSubmit="return validate_form ( );">
    <div align="center">
    	<table border="0" id="table1" width="702">
    		<tr>
    			<td width="699" colspan="7">
    								<img border="0" src="utm.jpg" width="726" height="60"></td>
    		</tr>
    		<tr>
    			<td width="206">
    								<font size="2">Family/Surname</font></td>
    			<td width="185" colspan="4">
    			<form method="POST" action="--WEBBOT-SELF--">
    				<p><input type="text" name="f_name" size="20"></p>
    			</form>
    			</td>
    			<td width="131">Student #</td>
    			<td width="177"><input type="text" name="student" size="20"></td>
    		</tr>
    		<tr>
    			<td width="206"><font size="2">Given Names</font></td>
    			<td width="185" colspan="4"><input type="text" name="g_name" size="20"></td>
    			<td width="131">
    								<font size="2">Former name (if applicable)</font></td>
    			<td width="177"><input type="text" name="fr_name" size="20"></td>
    		</tr>
    		<tr>
    			<td colspan="7"><i>
    								<font size="2">If you have changed your name since your last 
    								activation, please complete a Change of Name 
    								form at the office of the Registrar.</font></i></td>
    		</tr>
    		<tr>
    			<td width="206"><font size="2">Current Address</font></td>
    			<td width="185" colspan="4"><input type="text" name="c_address" size="20"></td>
    			<td width="131">
    								<font size="2">Apt.</font></td>
    			<td width="177"><input type="text" name="apt" size="20"></td>
    		</tr>
    		<tr>
    			<td width="206">
    								<label for="street_address"><font size="2">City</font></label></td>
    			<td width="185" colspan="4"><input type="text" name="city" size="20"></td>
    			<td width="131">
    								<font size="2">Province</font></td>
    			<td width="177"><input type="text" name="province" size="20"></td>
    		</tr>
    		<tr>
    			<td width="206">
    								<label for="city"><font size="2">Postal Code</font></label></td>
    			<td width="185" colspan="4"><input type="text" name="p_code" size="20"></td>
    			<td width="131">
    								<font size="2">Phone Number</font></td>
    			<td width="177"><input type="text" name="p_number" size="20"></td>
    		</tr>
    		<tr>
    			<td width="206"><font size="2">Email Address</font></td>
    			<td width="185" colspan="4"><input type="text" name="e_address" size="20"></td>
    			<td width="131">
    								<font size="2">Date Of Birth</font></td>
    			<td width="177">
    			&nbsp;<!--webbot bot="Validation" s-data-type="Number" s-number-separators=",." b-value-required="TRUE" --><input type="text" name="dob" size="20" value="mm/dd/yy"></td>
    		</tr>
    		<tr>
    			<td width="206"><font size="2">Sex</font></td>
    			<td width="20"><input type="radio" value="male" name="gender"></td>
    			<td width="58"><font size="2">Male</font></td>
    			<td width="20"><input type="radio" value="fermale" name="gender"></td>
    			<td width="76"><font size="2">Female</font></td>
    			<td width="131">
    								<font size="2">Marital Status</font></td>
    			<td width="177">
    			<form method="POST" action="--WEBBOT-SELF--">
    				<p><select size="1" name="marital_status">
    				<option value="Please Select an Option">Please Select an Option
    				</option>
    				<option value="Single">Single</option>
    				<option value="Other">Other</option>
    				<option value="Married">Married</option>
    				</select></p>
    			</form>
    			</td>
    		</tr>
    		<tr>
    			<td width="206">
    								<font size="2">Country of Citizenship</font></td>
    			<td width="185" colspan="4">
    			<input type="text" name="c_citizen" size="20"></td>
    			<td width="131">
    								<font size="2">Status in Canada</font></td>
    			<td width="177"><select size="1" name="status_canada">
    			<option value="Please Select an Option">Please Select an Option
    			</option>
    			<option value="Canadian Citizen">Canadian Citizen</option>
    			<option value="Permanent Residence">Permanent Residence</option>
    			<option value="Visa">Visa</option>
    			</select></td>
    		</tr>
    		<tr>
    			<td width="206">
    								<font size="2">Enroll in Session</font></td>
    			<td width="185" colspan="4"><select size="1" name="e_session">
    			<option value="Please Select an Option">Please Select an Option
    			</option>
    			<option value="May">May</option>
    			<option value="July">July</option>
    			<option value="September">September</option>
    			<option value="January">January</option>
    			</select></td>
    			<td width="131">
    								<font size="2">Last Session</font></td>
    			<td width="177"><select size="1" name="l_session">
    			<option value="Please Select an Option">Please Select an Option
    			</option>
    			<option value="May">May</option>
    			<option value="July">July</option>
    			<option value="September">September</option>
    			<option value="January">January</option>
    			</select></td>
    		</tr>
    		<tr>
    			<td width="206">
    								<font size="2">Degree already received from U of 
    								T</font></td>
    			<td width="20"><input type="radio" value="Yes" name="degree"></td>
    			<td width="58"><font size="2">Yes</font></td>
    			<td width="20"><input type="radio" value="No" name="degree"></td>
    			<td width="76"><font size="2">No</font></td>
    			<td width="131"><font size="2">If Yes 
    										please specify</font></td>
    			<td width="177"><input type="text" name="p_specify" size="20"></td>
    		</tr>
    	</table>
    	<table border="0" id="table2" width="699">
    		<tr>
    			<td>
    			<form method="POST" action="--WEBBOT-SELF--">
    				<p><input type="checkbox" name="terms" value="Yes"></p>
    			</form>
    			</td>
    			<td width="665"><i><font size="2">I certify that all 
    										the statements on this application are 
    										correct and complete. I understand that 
    										otherwise 
    										my <br>
    			re-registration in the faculty may be 
    										rescinded.</font></i></td>
    		</tr>
    		<tr>
    			<td>
    			&nbsp;</td>
    			<td width="665"><input type="submit" name="send" value="Send Details"></td>
    		</tr>
    	</table>
    </div>
    
    </body>
    
    </html>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •