SitePoint Sponsor

User Tag List

Results 1 to 15 of 15
  1. #1
    SitePoint Member
    Join Date
    Jun 2011
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Autotab is not working

    Autotab is not working in my code. What is the problem?


    Code:
    		<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    			<html lang="en">
    			
    
    
    <!-- s -->
    <head>
    				<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    				<title>Credit Finance - Service for consumers in need of financial assistance</title>
    				<meta name="keywords" content="">
    				<meta name="description" content="Royal Credit Finance is dedicated to helping consumers select leading Services in a variety of professional service industries">
    				<meta name="allow-search" content="yes">
    				<meta name="robots" content="index, follow">
    				<meta name="GOOGLEBOT" CONTENT="INDEX, FOLLOW">
    				<meta name="revisit-after" content="7 days" />
    				<script src="lite_validation.js"></script>
    				<!-- Date: 2010-07-17 -->
    				<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" title="no title" charset="utf-8">
                    <style type="text/css">
    <!--
    .style1 {color: #FF0000}
    .style2 {
    	font-size: 14px;
    	color: #8DA4B1;
    }
    .style4 {color: #FF0000; font-weight: bold; }
    .style5 {color: #999999}
    .style6 {color: #999999; font-weight: bold; }
    -->
                    </style>
    
    <script type="text/javascript">
    function formValidator(h) {
    	
    
    	if(h.purpose.value == "Select") { alert("Select Loan Purpose"); return false;}
    	if(h.amount.value == "Select") { alert("Select Loan Amount"); return false;}	
    	if(h.province.value == "Select") { alert("Select a State"); return false;}
    	if(h.income.value == "Select") { alert("Select Monthly Income"); return false;}	
    	
    
    			
    	var firstname = h.fname.value;
    	var lastname = h.lname.value;
    	var email = h.email.value;
    	//var dphone = h.phone1.value + h.phone2.value + h.phone3.value;	
    	//if(dphone.length < 10) {
    		//alert("Phone Number is Incorrect Format");
    		//return false;
    		
    	}
    	
    		if(isBlank(firstname,"First Name Cannot Be Blank")) {
    		if(isBlank(lastname,"Last Name Cannot Be Blank")) {
    			if(isBlank(email,"Email Cannot Be Blank")) {
    				if(isBlank(phone,"Day Phone Cannot Be Blank")) {
    					if(echeck(email)) {
    				return true;
    					}
    				}
    			}
    		}
    	}
    	return false;
    }
    function isBlank(f,errmsg) {
    
    	if(f.length == 0) {
    		alert(errmsg);
    		return false; 
    	}
    	return true;
    	
    }
    function echeck(str) {
    
    		var at="@"
    		var dot="."
    		var lat=str.indexOf(at)
    		var lstr=str.length
    		var ldot=str.indexOf(dot)
    		if (str.indexOf(at)==-1){
    		   alert("Invalid E-mail Address");
    		   return false;
    		}
    
    		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
    		   alert("Invalid E-mail Address");
    		   return false;
    		}
    
    		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
    		    alert("Invalid E-mail Address");
    		    return false;
    		}
    
    		 if (str.indexOf(at,(lat+1))!=-1){
    		    alert("Invalid E-mail Address");
    		    return false;
    		 }
    
    		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
    		    alert("Invalid E-mail Address");
    		    return false;
    		 }
    
    		 if (str.indexOf(dot,(lat+2))==-1){
    		    alert("Invalid E-mail Address");
    		    return false;
    		 }
    		
    		 if (str.indexOf(" ")!=-1){
    		    alert("Invalid E-mail Address");
    		    return false;
    		 }
    
     		 return true;					
    	}
    
    //-->
    </script>
    
    <script>
    
    function autotab(original,destination){
    if (original.getAttribute&&original.value.length==original.getAttribute("maxlength"))
    destination.focus()
    }
    
    </script>
    </head>
    
    
    
    			<body>
    <form onsubmit='return formValidator(this)' action="/formtoemail.php" method="post">
    
    
    			
    				<div id="header">					<img src="assets/header_right.jpg" alt="" width="445" height="136">
    				</div>
    				
    				
    
    	
    
    <h1>Apply</h1>
    <tr>
          <td colspan="3" bgcolor="#FFFFFF">&nbsp;        </td>
      </tr>
        <tr>
          <td bgcolor="#FFFFFF">&nbsp;        </td>
    	    <td bgcolor="#FFFFFF"><table width="742" border="0" align="center">
    	      <tr>
    	        <td colspan="5" bgcolor="#FFFFFF"><p align="center" class="style1"><span class="style4">Please provide the following information then click on the &lsquo;Submit&rsquo; button to continue.</span></p>
    	          <p>&nbsp;</p></td>
              </tr>
    	      <tr class="content">
    	        <td colspan="5" bgcolor="#FFFFFF"><span class="style5 style2"><strong>Loan Request</strong></span></td>
              </tr>
    	      <tr class="content">
    	        <td width="199" bgcolor="#FFFFFF" class="style15">Loan Type: </td>
                <td width="180" bgcolor="#FFFFFF"><span class="style15">Loan Amount: </span></td>
                <td width="152" bgcolor="#FFFFFF">&nbsp;</td>
                <td width="95" bgcolor="#FFFFFF">&nbsp;</td>
                <td width="94" bgcolor="#FFFFFF">&nbsp;</td>
    	      </tr>
    	      <tr class="content">
    	        <td bgcolor="#FFFFFF"><span class="style5">
    	          <select name="purpose" id="purpose" tabindex="1">
                    <option value="---" selected="selected">Select</option>
                    <option value="Personal Loan">Personal Loan</option>
                    <option value="Auto Loan">Auto Loan</option>
                    <option value="Consolidation">Debt Consolidation</option>
                    <option value="Mortgage">Mortgage</option>
                    <option value="School">School Loan</option>
                    <option value="Refinance">Refinance</option>
                    <option value="Other">Other</option>
                  </select>
    	        </span></td>
                <td bgcolor="#FFFFFF"><span class="style5">
                  <select name="amount" id="amount" tabindex="2">
                    <option value="---" selected="selected">Select</option>
                    <option value="5k">$5,000</option>
                    <option value="6k">$6,000</option>
                    <option value="7k">$7,000</option>
                    <option value="8k">$8,000</option>
                    <option value="9k">$9,000</option>
                    <option value="10k">$10,000</option>
                    <option value="11k">$11,000</option>
                    <option value="12k">$12,000</option>
                    <option value="13k">$13,000</option>
                    <option value="14k">$14,000</option>
                    <option value="15k">$15,000</option>
                    <option value="20k">$20,000</option>
                    <option value="25k">$25,000</option>
                    <option value="30k">$30,000</option>
                    <option value="35k">$35,000</option>
                    <option value="40k">$40,000</option>
                    <option value="45k">$45,000</option>
                    <option value="50k">$50,000</option>
                    <option value="55k">$55,000</option>
                    <option value="60k">$60,000</option>
                    <option value="65k">$65,000</option>
                    <option value="70k">$70,000</option>
                    <option value="75k">$75,000</option>
                    <option value="80k">$80,000</option>
                    <option value="85k">$85,000</option>
                    <option value="90k">$90,000</option>
                    <option value="95k">$95,000</option>
                    <option value="100k">$100,000</option>
                    <option value="over100k">Over $100,000</option>
                  </select>
                </span></td>
                <td bgcolor="#FFFFFF">&nbsp;</td>
                <td bgcolor="#FFFFFF">&nbsp;</td>
                <td bgcolor="#FFFFFF">&nbsp;</td>
    	      </tr>
    	      <tr class="content">
    	        <td colspan="5" bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
    	      <tr class="content">
    	        <td colspan="5" bgcolor="#FFFFFF"><span class="style6">Personal Information </span></td>
              </tr>
    	      <tr class="content">
    	        <td bgcolor="#FFFFFF" class="style15">Title:</td>
                <td bgcolor="#FFFFFF" class="style15">First Name: </td>
                <td bgcolor="#FFFFFF" class="style15">Last Name:</td>
                <td colspan="2" bgcolor="#FFFFFF" class="style15">Gender:</td>
              </tr>
    	      <tr class="content">
    	        <td bgcolor="#FFFFFF">
    		        <label>
    		          <select name="title" id="title" tabindex="3">
    		            <option value="title">Title</option>
    		            <option value="mr">Mr.</option>
    		            <option value="Ms">Ms</option>
    		            <option value="Miss">Miss</option>
    		            <option value="Mrs">Mrs.</option>
                      </select>
    	            </label>
                </td>
                <td bgcolor="#FFFFFF"><span class="style13">
                    <input name="fname" type="text" id="fname" tabindex="4" />
                </span></td>
                <td bgcolor="#FFFFFF"><span class="style13">
                    <input name="lname" type="text" id="lname" tabindex="5" />
                </span></td>
                <td colspan="2" bgcolor="#FFFFFF"><span class="style14">
                    <select name="gender" id="gender" tabindex="6">
                      <option value="BLANK" selected="selected">Select</option>
                      <option value="MALE">MALE</option>
                      <option value="FEMALE">FEMALE</option>
                    </select>
                </span></td>
              </tr>
    	      <tr class="content">
    	        <td bgcolor="#FFFFFF" class="style15">&nbsp;</td>
    	        <td bgcolor="#FFFFFF" class="style15">&nbsp;</td>
    	        <td bgcolor="#FFFFFF" class="style15">&nbsp;</td>
    	        <td bgcolor="#FFFFFF" class="style15">&nbsp;</td>
    	        <td bgcolor="#FFFFFF" class="style15">&nbsp;</td>
              </tr>
    	      <tr class="content">
    	        <td bgcolor="#FFFFFF" class="style15">Street #: </td>
                <td bgcolor="#FFFFFF" class="style15">Address</td>
                <td bgcolor="#FFFFFF" class="style15">City</td>
                <td bgcolor="#FFFFFF" class="style15">State / Province:</td>
                <td bgcolor="#FFFFFF" class="style15">Zip/PostalCode: </td>
              </tr>
    	      <tr class="content">
    	        <td bgcolor="#FFFFFF"></td>
    		        
            
    	      <tr class="content">
    	        <td bgcolor="#FFFFFF" class="style15"><input name="address1" type="text" id="address12" tabindex="8"/></td>
    	        <td bgcolor="#FFFFFF" class="style15"><input name="city" type="text" id="city2" tabindex="9" /></td>
    	        <td bgcolor="#FFFFFF" class="style15"><input name="city2" type="text" id="city3" tabindex="9" /></td>
    	        <td bgcolor="#FFFFFF" class="style15"><select name="province" id="select2" tabindex="10">
                  <option value="---">Select</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>
                  <option value="CT">CT</option>
                  <option value="DC">DC</option>
                  <option value="DE">DE</option>
                  <option value="FL">FL</option>
                  <option value="GA">GA</option>
                  <option value="HI">HI</option>
                  <option value="IA">IA</option>
                  <option value="ID">ID</option>
                  <option value="IL">IL</option>
                  <option value="IN">IN</option>
                  <option value="KS">KS</option>
                  <option value="KY">KY</option>
                  <option value="LA">LA</option>
                  <option value="MA">MA</option>
                  <option value="MD">MD</option>
                  <option value="ME">ME</option>
                  <option value="MI">MI</option>
                  <option value="MN">MN</option>
                  <option value="MO">MO</option>
                  <option value="MS">MS</option>
                  <option value="MT">MT</option>
                  <option value="NC">NC</option>
                  <option value="ND">ND</option>
                  <option value="NE">NE</option>
                  <option value="NH">NH</option>
                  <option value="NJ">NJ</option>
                  <option value="NM">NM</option>
                  <option value="NV">NV</option>
                  <option value="NY">NY</option>
                  <option value="OH">OH</option>
                  <option value="OK">OK</option>
                  <option value="OR">OR</option>
                  <option value="PA">PA</option>
                  <option value="RI">RI</option>
                  <option value="SC">SC</option>
                  <option value="SD">SD</option>
                  <option value="TN">TN</option>
                  <option value="TX">TX</option>
                  <option value="UT">UT</option>
                  <option value="VA">VA</option>
                  <option value="VT">VT</option>
                  <option value="WA">WA</option>
                  <option value="WI">WI</option>
                  <option value="WV">WV</option>
                  <option value="WY">WY</option>
                  <option value="AB">AB</option>
                  <option value="BC">BC</option>
                  <option value="MB">MB</option>
                  <option value="NB">NB</option>
                  <option value="NL">NL</option>
                  <option value="NS">NS</option>
                  <option value="NT">NT</option>
                  <option value="NU">NU</option>
                  <option value="ON">ON</option>
                  <option value="PE">PE</option>
                  <option value="QC">QC</option>
                  <option value="SK">SK</option>
                  <option value="YT">YT</option>
                </select></td>
    	        <td bgcolor="#FFFFFF"><span class="style15">
    	          <input name="zip2" type="text" id="zip3" size="7" maxlength="7" tabindex="11" />
    	        </span></td>
              </tr>
    	      <tr class="content">
    	        <td bgcolor="#FFFFFF" class="style15">&nbsp;</td>
    	        <td bgcolor="#FFFFFF" class="style15">&nbsp;</td>
    	        <td bgcolor="#FFFFFF" class="style15">&nbsp;</td>
    	        <td bgcolor="#FFFFFF" class="style15">&nbsp;</td>
    	        <td bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
    	      <tr class="content">
    	        <td bgcolor="#FFFFFF" class="style15">Primary Phone: </td>
                <td bgcolor="#FFFFFF" class="style15">Secondary Phone: </td>
                <td bgcolor="#FFFFFF" class="style15">E-Mail:</td>
                <td bgcolor="#FFFFFF" class="style15">Time to Contact: </td>
                <td bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
    	      <tr class="content">
    	        <td bgcolor="#FFFFFF"><span class="style15">
    		        <input type="text" name="first" size=4 onKeyup="autotab(this, document.phone.second)" maxlength=3> 
    				<input type="text" name="second" size=4 onKeyup="autotab(this, document.phone.third)" maxlength=3> 
    				<input type="text" name="third" size=5 maxlength=4>		        
    
                </span></td>
                <td bgcolor="#FFFFFF"><span class="style15">
    		        <input type="text" name="first" size=4 onKeyup="autotab(this, document.phone2.second)" maxlength=3> 
    				<input type="text" name="second" size=4 onKeyup="autotab(this, document.phone2.forth)" maxlength=3> 
    				<input type="text" name="forth" size=5 maxlength=4>	
                </span></td>
                <td bgcolor="#FFFFFF"><input name="email" type="text" id="email" tabindex="18" /></td>
                <td bgcolor="#FFFFFF"><span class="style15">
                    <select name="contact" id="contact" tabindex="19">
                      <option value="---" selected="selected">Select</option>
                      <option value="M">Morning</option>
                      <option value="A">Afternoon</option>
                      <option value="E">Evening</option>
                    </select>
                </span></td>
                <td bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
    	      <tr class="content">
    	        <td bgcolor="#FFFFFF">&nbsp;</td>
                <td bgcolor="#FFFFFF">&nbsp;</td>
                <td bgcolor="#FFFFFF">&nbsp;</td>
                <td bgcolor="#FFFFFF">&nbsp;</td>
                <td bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
    	      <tr class="content">
    	        <td colspan="2" bgcolor="#FFFFFF"><span class="style6"><strong>Employment Information </strong></span></td>
    	        <td bgcolor="#FFFFFF">&nbsp;</td>
    	        <td bgcolor="#FFFFFF">&nbsp;</td>
    	        <td bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
    	      <tr class="content">
    	        <td valign="bottom" bgcolor="#FFFFFF" class="style15">Occupation:</td>
    	        <td valign="bottom" bgcolor="#FFFFFF" class="style15">Employer:</td>
    	        <td valign="bottom" bgcolor="#FFFFFF" class="style15">Lenth of Employment:  </td>
    	        <td bgcolor="#FFFFFF" class="style15">&nbsp;</td>
    	        <td bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
    	      <tr class="content">
    	        <td bgcolor="#FFFFFF"><span class="style16">
    	          <input name="occupation" type="text" id="occupation"  tabindex="20"/>
    	        </span></td>
    	        <td bgcolor="#FFFFFF"><span class="style16">
    	          <input name="employer" type="text" id="employer" tabindex="21" />
    	        </span></td>
    	        <td bgcolor="#FFFFFF"><span class="style5">
    	          <select name="empy" id="empy" tabindex="22">
                    <option value="---">---</option>
                    <option value="1">01</option>
                    <option value="2">02</option>
                    <option value="3">03</option>
                    <option value="4">04</option>
                    <option value="5">05</option>
                    <option value="6">06</option>
                    <option value="7">07</option>
                    <option value="8">08</option>
                    <option value="9">09</option>
                    <option value="10">10</option>
                    <option value="11">11</option>
                    <option value="12">12</option>
                    <option value="13">13</option>
                    <option value="14">14</option>
                    <option value="15">15</option>
                    <option value="16">16</option>
                    <option value="17">17</option>
                    <option value="18">18</option>
                    <option value="19">19</option>
                    <option value="20">20</option>
                    <option value="21">21</option>
                    <option value="22">22</option>
                    <option value="23">23</option>
                    <option value="24">24</option>
                    <option value="25">25</option>
                    <option value="26">26</option>
                    <option value="27">27</option>
                    <option value="28">28</option>
                    <option value="29">29</option>
                    <option value="30">30</option>
                  </select>
    yrs
    <select name="empm" id="empm" tabindex="23">
      <option value="---">---</option>
      <option value="1">01</option>
      <option value="2">02</option>
      <option value="3">03</option>
      <option value="4">04</option>
      <option value="5">05</option>
      <option value="6">06</option>
      <option value="7">07</option>
      <option value="8">08</option>
      <option value="9">09</option>
      <option value="10">10</option>
      <option value="11">11</option>
    </select>
    	        mths</span></td>
    	        <td bgcolor="#FFFFFF">&nbsp;</td>
    	        <td bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
    	      <tr valign="bottom" class="content">
    	        <td bgcolor="#FFFFFF">&nbsp;</td>
    	        <td bgcolor="#FFFFFF">&nbsp;</td>
    	        <td bgcolor="#FFFFFF">&nbsp;</td>
    	        <td bgcolor="#FFFFFF">&nbsp;</td>
    	        <td bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
    	      <tr valign="bottom" class="content">
    	        <td bgcolor="#FFFFFF"><span class="style15">Street #: </span></td>
    	        <td bgcolor="#FFFFFF"><span class="style15">Address:</span></td>
    	        <td bgcolor="#FFFFFF"><span class="style15">City:</span></td>
    	        <td bgcolor="#FFFFFF"><span class="style15">State / Province:</span></td>
    	        <td bgcolor="#FFFFFF"><span class="style15">Zip/Postal Code: </span></td>
              </tr>
    	      <tr class="content">
    	        <td bgcolor="#FFFFFF"><input name="eaddressnumber2" type="text" id="eaddressnumber2" size="10" tabindex="24"></td>
    	        <td bgcolor="#FFFFFF"><span class="style16">
    	          <input name="eaddress" type="text" id="eaddress" tabindex="25"/>
    	        </span></td>
    	        <td bgcolor="#FFFFFF"><span class="style16">
    	          <input name="ecity" type="text" id="ecity" tabindex="26" />
    	        </span></td>
    	        <td bgcolor="#FFFFFF"><span class="style15">
    	          <select name="eprovince" id="eprovince" tabindex="27">
                    <option value="---">Select</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>
                    <option value="CT">CT</option>
                    <option value="DC">DC</option>
                    <option value="DE">DE</option>
                    <option value="FL">FL</option>
                    <option value="GA">GA</option>
                    <option value="HI">HI</option>
                    <option value="IA">IA</option>
                    <option value="ID">ID</option>
                    <option value="IL">IL</option>
                    <option value="IN">IN</option>
                    <option value="KS">KS</option>
                    <option value="KY">KY</option>
                    <option value="LA">LA</option>
                    <option value="MA">MA</option>
                    <option value="MD">MD</option>
                    <option value="ME">ME</option>
                    <option value="MI">MI</option>
                    <option value="MN">MN</option>
                    <option value="MO">MO</option>
                    <option value="MS">MS</option>
                    <option value="MT">MT</option>
                    <option value="NC">NC</option>
                    <option value="ND">ND</option>
                    <option value="NE">NE</option>
                    <option value="NH">NH</option>
                    <option value="NJ">NJ</option>
                    <option value="NM">NM</option>
                    <option value="NV">NV</option>
                    <option value="NY">NY</option>
                    <option value="OH">OH</option>
                    <option value="OK">OK</option>
                    <option value="OR">OR</option>
                    <option value="PA">PA</option>
                    <option value="RI">RI</option>
                    <option value="SC">SC</option>
                    <option value="SD">SD</option>
                    <option value="TN">TN</option>
                    <option value="TX">TX</option>
                    <option value="UT">UT</option>
                    <option value="VA">VA</option>
                    <option value="VT">VT</option>
                    <option value="WA">WA</option>
                    <option value="WI">WI</option>
                    <option value="WV">WV</option>
                    <option value="WY">WY</option>
                    <option value="AB">AB</option>
                    <option value="BC">BC</option>
                    <option value="MB">MB</option>
                    <option value="NB">NB</option>
                    <option value="NL">NL</option>
                    <option value="NS">NS</option>
                    <option value="NT">NT</option>
                    <option value="NU">NU</option>
                    <option value="ON">ON</option>
                    <option value="PE">PE</option>
                    <option value="QC">QC</option>
                    <option value="SK">SK</option>
                    <option value="YT">YT</option>
                  </select>
    	        </span></td>
    	        <td bgcolor="#FFFFFF"><span class="style16">
    	          <input name="ezip" type="text" id="ezip" size="7" maxlength="7" tabindex="28" />
    	        </span></td>
              </tr>
    	      <tr class="content">
    	        <td valign="bottom" bgcolor="#FFFFFF">&nbsp;</td>
    	        <td valign="bottom" bgcolor="#FFFFFF">&nbsp;</td>
    	        <td valign="bottom" bgcolor="#FFFFFF">&nbsp;</td>
    	        <td valign="baseline" bgcolor="#FFFFFF">&nbsp;</td>
    	        <td valign="baseline" bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
    	      <tr class="content">
    	        <td valign="bottom" bgcolor="#FFFFFF"><span class="style15">Work #: </span></td>
    	        <td valign="bottom" bgcolor="#FFFFFF"><span class="style15">Income:</span></td>
    	        <td valign="bottom" bgcolor="#FFFFFF"><span class="style15">SSN / SIN:</span></td>
    	        <td valign="baseline" bgcolor="#FFFFFF">&nbsp;</td>
    	        <td valign="baseline" bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
    	      <tr class="content">
    	        <td bgcolor="#FFFFFF"><span class="style15">
    	          <input name="wphone1" type="text" id="wphone1" size="3" maxlength="3" tabindex="29" />
                  <input name="wphone2" type="text" id="wphone2" size="3" maxlength="3" tabindex="30" />
                  <input name="wphone3" type="text" id="wphone3" size="4" maxlength="4" tabindex="31" />
    	        </span></td>
    	        <td bgcolor="#FFFFFF"><span class="style5">
    	          <select name="income" id="income" tabindex="32">
                    <option value="---" selected="selected">Select</option>
                    <option value="$15000">$15,000</option>
                    <option value="$18000">$18,000</option>
                    <option value="$20000">$20,000</option>
                    <option value="$25000">$25,000</option>
                    <option value="$30000">$30,000</option>
                    <option value="$35000">$35,000</option>
                    <option value="$40000">$40,000</option>
                    <option value="$45000">$45,000</option>
                    <option value="$50000">$50,000</option>
                    <option value="$55000">$55,000</option>
                    <option value="$60000">$60,000</option>
                    <option value="Over $60000">Over $60,000</option>
                  </select>
    	        </span></td>
    	        <td bgcolor="#FFFFFF"><span class="style16">
    	          <input name="sin" type="text" id="sin" tabindex="33" size="10" maxlength="30"/>
    	        </span></td>
    	        <td bgcolor="#FFFFFF">&nbsp;</td>
    	        <td bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
    	      <tr class="content">
    	        <td bgcolor="#FFFFFF">&nbsp;</td>
    	        <td bgcolor="#FFFFFF">&nbsp;</td>
    	        <td bgcolor="#FFFFFF">&nbsp;</td>
    	        <td bgcolor="#FFFFFF">&nbsp;</td>
    	        <td bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
    	      <tr class="content">
    	        <td colspan="5" bgcolor="#FFFFFF"><div align="center"><span class="style15"> Clicking the 'Submit' button, you agree to the <a href="privacy.html">Privacy Policy</a> and <a href="terms.html">Terms of Website Use</a> for Royal Credit Finance. </span></div></td>
              </tr>
    	      <tr>
    	        <td colspan="5" bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
    	      <tr>
    	        <td colspan="5" bgcolor="#FFFFFF"><div align="center">
    	          <input type="submit" name="Submit" value="Submit">
                </div></td>
              </tr>
          </table></td>
    	    <td bgcolor="#FFFFFF">&nbsp;		    </td>
        </tr>
        <tr>
          <td colspan="5">&nbsp;        </td>
        </tr>
      </table>
     
    
    
    
    </form>				
    <table width="200" border="0" align="center">
      <tr>
        <td><img src="assets/InstantSSL-DV_tl_trans.gif" width="98" height="98"></td>
        <td><img src="assets/secure.jpg" width="98" height="152"></td>
      </tr>
    </table>
    <br />
    			
    			<div id="footer">
    				<img src="assets/footer_hr.jpg">
    				
    <ul class="simpleCMS_Menu">
    	<li style="float: left;" class="listItem selected first cms_" onMouseOver="this.className += ' hover';" onMouseOut="this.className = this.className.replace(/ hover/, '');"><a href="index.html">Home</a></li>
    	<li style="float: left;" class="listItem cms_about_us" onMouseOver="this.className += ' hover';" onMouseOut="this.className = this.className.replace(/ hover/, '');"><a href="about-us.html">About Us</a></li>
    	<li style="float: left;" class="listItem cms_contact_us" onMouseOver="this.className += ' hover';" onMouseOut="this.className = this.className.replace(/ hover/, '');"><a href="contact-us.html">Contact Us</a></li>
    	<li style="float: left;" class="listItem last cms_service_providers" onMouseOver="this.className += ' hover';" onMouseOut="this.className = this.className.replace(/ hover/, '');"><a href="services.html">Services</a></li>
        <li style="float: left;" class="listItem last cms_service_providers" onMouseOver="this.className += ' hover';" onMouseOut="this.className = this.className.replace(/ hover/, '');"><a href="testimonials.html">Testimonials</a></li>
    	<li style="float: left;" class="listItem cms_privacy_policy" onMouseOver="this.className += ' hover';" onMouseOut="this.className = this.className.replace(/ hover/, '');"><a href="privacy.html">Privacy Policy</a></li>
    	<li style="float: left;" class="listItem cms_terms_of_use" onMouseOver="this.className += ' hover';" onMouseOut="this.className = this.className.replace(/ hover/, '');"><a href="terms.html">Terms of Use</a></li>
    </ul>
    				<p>&copy; 2011  Credit Finance. All rights reserved. 
    				<br>
    				<!-- <a href="res/sitemap.html"  style='color:#999'></a>			</p>
    				<img src="assets/footer_bottom.gif"> -->
    			</div>
    		</div>
    
    		</body>
    		
    
    
    <!-- s -->
    </html>

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    You didn't comment out a closing brace?
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Member
    Join Date
    Jun 2011
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Which closing brace?

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by mytrend View Post
    Which closing brace?
    The one near the code that has already been commented out.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  5. #5
    SitePoint Member
    Join Date
    Jun 2011
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You mean:
    The

    //-->
    </script>

    Part?

  6. #6
    SitePoint Member
    Join Date
    Jun 2011
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry for being ignorant, but I don't see where I commented out a code. Would you please tell me which one it is?

  7. #7
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by mytrend View Post
    You mean:
    The

    //-->
    </script>

    Part?
    No, that is an HTML comment.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  8. #8
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by mytrend View Post
    Sorry for being ignorant, but I don't see where I commented out a code. Would you please tell me which one it is?
    Your commented-out code is half-way through your formValidator function.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  9. #9
    SitePoint Member
    Join Date
    Jun 2011
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is my validation code, but which one of is should I comment out?

    Code:
    function has_id(id){try{var tmp=document.getElementById(id).value;}catch(e){return false;}
    return true;}
    function has_name(nm){try{var tmp=cfrm.nm.type;}catch(e){return false;}
    return true;}
    function $$(id){if(!has_id(id)&&!has_name(id)){alert("Field "+id+" does not exist!\n Form validation configuration error.");return false;}
    if(has_id(id)){return document.getElementById(id).value;}else{return;}}
    function $val(id){return document.getElementById(id);}
    function trim(id){$val(id).value=$val(id).value.replace(/^\s+/,'').replace(/\s+$/,'');}
    var required={field:[],add:function(name,type,mess){this.field[this.field.length]=[name,type,mess];},out:function(){return this.field;},clear:function(){this.field=[];}};var validate={check:function(cform){var error_message='Please fix the following errors:\n\n';var mess_part='';var to_focus='';var tmp=true;for(var i=0;i<required.field.length;i++){if(this.checkit(required.field[i][0],required.field[i][1],cform)){}else{error_message=error_message+required.field[i][2]+'  is invalid\n';if(has_id(required.field[i][0])&&to_focus.length===0){to_focus=required.field[i][0];}
    tmp=false;}}
    if(!tmp){alert(error_message);}
    if(to_focus.length>0){document.getElementById(to_focus).focus();}
    return tmp;},checkit:function(cvalue,ctype,cform){if(ctype=="NOT_EMPTY"){if(this.trim($$(cvalue)).length<1){return false;}else{return true;}}else if(ctype=="EMAIL"){exp=/^[a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;if($$(cvalue).match(exp)==null){return false;}else{return true;}}},trim:function(s){if(s.length>0){return s.replace(/^\s+/,'').replace(/\s+$/,'');}else{return s;}}};

  10. #10
    SitePoint Member
    Join Date
    Jun 2011
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone who can help me out on this?

  11. #11
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by mytrend View Post
    Here is my validation code, but which one of is should I comment out?
    None of that is the formValidator function.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  12. #12
    SitePoint Member Mike1500W's Avatar
    Join Date
    Oct 2010
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    //if(dphone.length < 10) { <<< opening
    //alert("Phone Number is Incorrect Format");
    //return false;

    } <<< this would be my guess... as far as a stray closing bracket

    maybe it's not yours?
    hard to tell - alot of code for one question - to me anyway.

  13. #13
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by Mike1500W View Post
    //if(dphone.length < 10) { <<< opening
    //alert("Phone Number is Incorrect Format");
    //return false;

    } <<< this would be my guess... as far as a stray closing bracket

    maybe it's not yours?

    That is the one that I have been prodding him towards. It's the one he forgot to comment out when he was commenting out that code above it.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  14. #14
    SitePoint Member
    Join Date
    Jun 2011
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Guys, I have already fixed it. I am trying to get the button to make this thread solved/closed.

  15. #15
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by mytrend View Post
    Guys, I have already fixed it. I am trying to get the button to make this thread solved/closed.
    Normally threads are left open in case anyone has anything else they would like to add.

    Letting us know that the problem is fixed is enough. Thank you.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Tags for this Thread

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
  •