Form Submits Before JavaScript Validation

ASP form using JavaScript validation and C# script to submit form

Page 1 of 1

5 Replies - 2878 Views - Last Post: 19 November 2009 - 07:31 AM

#1 S.R.K.  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 20
  • Joined: 15-September 09

Form Submits Before JavaScript Validation

Posted 17 November 2009 - 12:45 PM

Hey all!

I am fairly new to web development but am working as an intern this semester and learning everything I can.

A project I was given was to take a form, from a template, and use that to create a new form for a different purpose. The "template" I was given used a C# script that would validate the email address and then send the form data as a text email. To say the least, the form I was given to work with was inadequate and not very well done. The template had no client side validation so none of the forms were required to be submitted and if an invalid email address was given, the page failed displaying an error that is of no use to anyone without access to the server.

So, I created the new form which just required adding new field elements. However, I wanted to add client-side validation. I wrote scripts in Javascript to validate the email address and verify that valid fields were filled out. The form uses ASP form fields in order to submit the data to the server. Because of this, I could not add the Javascript (I'm told) as would normally be done in HTML because asp fields don't have attributes such as onblur, onfocus, etc. To handle this, I created added a Page_Load function to the C# scripts that would add the appropriate attributes to the appropriate fields.

	 void Page_Load(object sender, EventArgs e) {
		 
		 if(instance==null){
			Submit.Attributes.Add("onfocus", "completeAddress('quoteForm', 'LocAddSame','onsubmit'); validateForm('quoteForm'); blurButton('Submit'); ");
		
			  LocAddSame.Attributes.Add("onclick", "completeAddress('quoteForm','LocAddSame', 'inForm')");
		
			Email.Attributes.Add("onblur", "validateField('emailAddress', 'Email')");
			
			Other.Attributes.Add("onclick", "enableTextbox('quoteForm','Other','otherProfCenter')");
			
			instance = "instantiated";
				 
			}
   }



This appears to work well for most of the scripts. I have a script to auto-complete the address field if the "Same As" checkbox is check. I have a script to display a textbox if the "other" checkbox is checked. Those scripts run fine.

(Actually, the whole page works correctly in IE and Firefox).

However, using a more compliant browser such as Chrome, Safari, or Opera, the validation script does not run. The validation js is to check to see if the required fields are validated. If the fields are valid, true is returned. If they are not valid, false is returned, the style sheet of the field objects are changed to a pink to "highlight" them, and an window pops up to say that required fields are not valid. The returning false is to keep the page from submitting, which occurs onclick, but after the Javascript passes.

The submit button is as follows in the code...
<asp:Button id="Submit" Text="Submit" runat="server" onclick="SendEmail"/>



When the webpage renders it renders as...
<input type="submit" name="Submit" value="Submit" id="Submit" onfocus="completeAddress('quoteForm', 'LocAddSame','onsubmit'); validateForm('quoteForm'); blurButton('Submit'); " /> 




Again, this works in IE and Firefox, but in the other browsers, clicking the "Submit" button submits the form, or attempts to, whether the fields are valid or not.

What I'm hoping for are some suggestions as to how I can prevent the field from submitting before it is validated. I believe if I had to do over, I would use much different methods than I did here to validate and submit the form. However, it is what it is and I had to work with what my employer gave me. They are ok with it working only on IE and FF, but I would really like to get it working on all browsers. I'm looking for advice on changes I could try to fix my problem without a complete overhall. I don't mind putting some work, thought, and time into this yet, but I just can't start over. Any suggestions would be greatly appreciated. I can provide more information as needed to help you all understand what I've done so far.

Is This A Good Question/Topic? 0
  • +

Replies To: Form Submits Before JavaScript Validation

#2 forest51690  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 58
  • View blog
  • Posts: 340
  • Joined: 20-March 09

Re: Form Submits Before JavaScript Validation

Posted 18 November 2009 - 06:28 PM

Hi, You posted the server-side code, but can you post the HTML and Javascript code as well, because that would make it easier for us to help you out.
Was This Post Helpful? 0
  • +
  • -

#3 S.R.K.  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 20
  • Joined: 15-September 09

Re: Form Submits Before JavaScript Validation

Posted 19 November 2009 - 06:59 AM

Accidental Multiple Post

This post has been edited by S.R.K.: 19 November 2009 - 07:26 AM

Was This Post Helpful? 0
  • +
  • -

#4 S.R.K.  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 20
  • Joined: 15-September 09

Re: Form Submits Before JavaScript Validation

Posted 19 November 2009 - 06:59 AM

Accidental Multiple Post

This post has been edited by S.R.K.: 19 November 2009 - 07:26 AM

Was This Post Helpful? 0
  • +
  • -

#5 S.R.K.  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 20
  • Joined: 15-September 09

Re: Form Submits Before JavaScript Validation

Posted 19 November 2009 - 07:23 AM

Thanks for the guidance. I'd be happy to include the HTML and Javascript (at least as much as I can without worrying about violating any company polices).

Let me start by saying that I may not have as big of a problem as I thought. My page is actually working in Internet Explorer, Firefox, and Opera. I had not realize before that it was not working in Opera. Though I'd prefer that it work 100% in all 5 major browsers, the fact that it works in Opera makes be feel better about my work. I heard Safari is not one of the better browsers (and see it scores less than perfect on the Acid 3 test), and Chrome is still quite new may have some of their own stuff going on there.

I would still like to find out what my problem is, but I'm certainly not willing to 'break' my application in the other browsers for Chrome or Safari support.

So...I previously posted the server-side C# function that inserts the Javascript function calls into the HTML when the page is rendered. I can also include the HTML and the Javascript as they appear on the client-side. I will post as much as I can to be useful. I will edit out template HTML and any company information that may be included.

I had previously avoided posting so much code because it is quite long, but of course I have to do what is necessary for anyone to be able to help me.

Javascript
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
<html> 
	<head> 
		
	<script type="text/javascript"> 
		
	function blurButton(id){
			document.getElementById(id).blur();
	}
		
		function enableTextbox(form, checkboxID, textboxID){
			
			var checkboxFieldElement = document.getElementById(checkboxID);
			var textboxFieldElement = document.getElementById(textboxID);
			
			if( checkboxFieldElement.checked ){
				textboxFieldElement.style.visibility = 'visible';
			} else {
				textboxFieldElement.style.visibility = 'hidden';
			}
			
		}
	
		function completeAddress(form, id, callLoc){
			
			var fieldElement = document.getElementById(id);
			var fields = elmNames(quoteForm);
	
			var mailAddressField = document.getElementById(fields[3]);
			var mailCityField = document.getElementById(fields[4]);
			var mailStateField = document.getElementById(fields[5]);
			var mailZipField = document.getElementById(fields[6]);
			
			var locAddressField = document.getElementById(fields[8]);
			var locCityField = document.getElementById(fields[9]);
			var locStateField = document.getElementById(fields[10]);
			var locZipField = document.getElementById(fields[11]);
				
			if( callLoc == 'inForm' ){
				if( fieldElement.checked){
					// Auto-Complete
					locAddressField.value = mailAddressField.value;
					locCityField.value = mailCityField.value;
					locStateField.value = mailStateField.value;
					locZipField.value = mailZipField.value;	
					
					// Disable Fields
					locAddressField.setAttribute('disabled', 'disabled');
					locCityField.setAttribute('disabled', 'disabled');
					locStateField.setAttribute('disabled', 'disabled');
					locZipField.setAttribute('disabled', 'disabled');
					
				} 
				
				if( (!fieldElement.checked)){
					
					// Remove 'disabled' (enable)
					locAddressField.removeAttribute('disabled');
					locCityField.removeAttribute('disabled');
					locStateField.removeAttribute('disabled');
					locZipField.removeAttribute('disabled');
		
					// Clear Fields
					locAddressField.value = "";
					locCityField.value = "";
					locStateField.value = "";
					locZipField.value = "";
				}
			}
			
			if( callLoc == 'onsubmit' ){
				if( fieldElement.checked){
					
					// Auto-Complete
					locAddressField.value = mailAddressField.value;
					locCityField.value = mailCityField.value;
					locStateField.value = mailStateField.value;
					locZipField.value = mailZipField.value;
					
					// Disable Fields
					locAddressField.setAttribute('disabled', 'disabled');
					locCityField.setAttribute('disabled', 'disabled');
					locStateField.setAttribute('disabled', 'disabled');
					locZipField.setAttribute('disabled', 'disabled');
					
				} 
				
				if( (!fieldElement.checked)){
					
					// Remove 'disabled' (enable)
					locAddressField.removeAttribute('disabled');
					locCityField.removeAttribute('disabled');
					locStateField.removeAttribute('disabled');
					locZipField.removeAttribute('disabled');
					
				}
			}
			
		return false;  
		}
		
		function enableAddressFields(form, id){
			
			var fieldElement = document.getElementById(id);
			var fields = elmNames(quoteForm);
	
			var locAddressField = document.getElementById(fields[8]);
			var locCityField = document.getElementById(fields[9]);
			var locStateField = document.getElementById(fields[10]);
			var locZipField = document.getElementById(fields[11]);
		
			// Remove 'disabled' (enable) so that objects will be recognized objects
			locAddressField.removeAttribute('disabled');
			locCityField.removeAttribute('disabled');
			locStateField.removeAttribute('disabled');
			locZipField.removeAttribute('disabled');	
		}
		
		function validateField(type, id){
			
			var validEmailPattern = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;  
																
			if(type == 'emailAddress'){
				var email = document.getElementById(id);
			
				if(validEmailPattern.test(email.value)){
					email.className ='correctStyle';
				} else {
					email.className ='errorStyle';
					alert('Please enter a valid email address');
					email.focus();
				}	
			}
		}
		
		function submitTextFieldValidate(field){
			
			var fieldValidation = true;
			var blankSpacePattern = /[\w]/;	
			var fieldElement = document.getElementById(field);
			
			if(fieldElement.value==''||!(fieldElement.value.match(blankSpacePattern)))
			   // empty or doesn't contain anything word characters
			{
				fieldElement.className = 'errorStyle';
				fieldValidation = false;
			} else {
				fieldElement.className = 'correctStyle';	
			}
			
			return fieldValidation;
		}
	
		
		function submitCheckboxFieldValidate(field){
			
			var fieldValidation = true;
			var fieldElement = document.getElementById(field);
	
			if(!fieldElement.checked)
			{
				fieldValidation = false;
			}
			
			return fieldValidation;
		}
		
		
		function elmNames(quoteForm){
			var fields = new Array();
	
			for(i=0; i<quoteForm.elements.length; i++){
				
				/*
				// UnComment to see field element numbers 
				alert(quoteForm.elements[i].name+" "+i);
				*/
				
				fields[i] = quoteForm.elements[i].name;
				}
	  
		 return fields;
		 }
		
		function validateForm(id){
			
			var fields = elmNames(quoteForm);
			var validation = true;					// Validation variable.  This is set to false if any of the fields is invalid.
			var tempValidate; 						// Temporary validation variable used to check whether or not to set the form validation variable
			
			// Checkbox Field Objects
			var selfServeField = document.getElementById(fields[16]);	
			var extOnlyField = document.getElementById(fields[17]);	
			var fullServiceField = document.getElementById(fields[18]);
			var gasField = document.getElementById(fields[19]);
			var lubeField = document.getElementById(fields[20]);
			var convStoreField = document.getElementById(fields[21]);
			var detailingField = document.getElementById(fields[22]);
			var otherField = document.getElementById(fields[23]);
		var joistedMasonryField = document.getElementById(fields[29]);
		var nonCombustible = document.getElementById(fields[30]);
		var masonryCombustible = document.getElementById(fields[31]);
			
			// Check Fields
			tempValidate = submitTextFieldValidate(fields[1]);		// Car Wash Name
			if(tempValidate == false){
				validation = false;	
			}
			tempValidate = submitTextFieldValidate(fields[2]);		// Contact Name
			if(tempValidate == false){
				validation = false;	
			}
			tempValidate = submitTextFieldValidate(fields[3]);		// Mail Address
			if(tempValidate == false){
				validation = false;	
			}
			tempValidate = submitTextFieldValidate(fields[4]);		// Mail City
			if(tempValidate == false){
				validation = false;	
			}
			tempValidate = submitTextFieldValidate(fields[5]);		// Mail State
			if(tempValidate == false){
				validation = false;	
			}
			tempValidate = submitTextFieldValidate(fields[6]);		// Mail Zip Code
			if(tempValidate == false){
				validation = false;	
			}
			tempValidate = submitTextFieldValidate(fields[8]);		// Location Address
			if(tempValidate == false){
				validation = false;	
			}
			tempValidate = submitTextFieldValidate(fields[9]);		// Location City
			if(tempValidate == false){
				validation = false;	
			}
			tempValidate = submitTextFieldValidate(fields[10]);		// Location State
			if(tempValidate == false){
				validation = false;	
			}
			tempValidate = submitTextFieldValidate(fields[11]);		// Location Zip Code
			if(tempValidate == false){
				validation = false;	
			}
			tempValidate = submitTextFieldValidate(fields[12]);		// Phone Number
			if(tempValidate == false){
				validation = false;	
			}
			tempValidate = submitTextFieldValidate(fields[14]);		// Email Address
			if(tempValidate == false){
				validation = false;	
			}
			tempValidate = submitTextFieldValidate(fields[26]);		// Building Replacement Cost
			if(tempValidate == false){
				validation = false;	
			}
			tempValidate = submitTextFieldValidate(fields[32]);		// Annual Receipts
			if(tempValidate == false){
				validation = false;	
			}
			tempValidate = submitTextFieldValidate(fields[33]);		// Year Built
			if(tempValidate == false){
				validation = false;	
			}
			
			// Car Wash Type
			if(!((submitCheckboxFieldValidate(fields[16]))||(submitCheckboxFieldValidate(fields[17]))||(submitCheckboxFieldValidate(fields[18])))){
				
				document.getElementById('selfServeSpan').className = 'errorStyleSpan';
				document.getElementById('extOnlySpan').className = 'errorStyleSpan';
				document.getElementById('fullServiceSpan').className = 'errorStyleSpan';
		
				
				validation = false;
			
			}else {
				
			   document.getElementById('selfServeSpan').className = 'correctStyle';
				document.getElementById('extOnlySpan').className = 'correctStyle';
				document.getElementById('fullServiceSpan').className = 'correctStyle';
	
			}
			
			//Profit Centers
			if(!((submitCheckboxFieldValidate(fields[19]))||(submitCheckboxFieldValidate(fields[20]))||(submitCheckboxFieldValidate(fields[21]))||(submitCheckboxFieldValidate(fields[22]))||(submitCheckboxFieldValidate(fields[23])))){
				
				document.getElementById('gasSpan').className = 'errorStyleSpan';
				document.getElementById('lubeSpan').className = 'errorStyleSpan';
				document.getElementById('convStoreSpan').className = 'errorStyleSpan';
				document.getElementById('detailingSpan').className = 'errorStyleSpan';
			   	document.getElementById('otherSpan').className = 'errorStyleSpan';
				
				validation = false;
				
			} else {
		document.getElementById('gasSpan').className = 'correctStyle';
		document.getElementById('lubeSpan').className = 'correctStyle';
				document.getElementById('convStoreSpan').className = 'correctStyle';
				document.getElementById('detailingSpan').className = 'correctStyle';
			   	document.getElementById('otherSpan').className = 'correctStyle';
				
			}
			
			//Construction Types
		if(!((submitCheckboxFieldValidate(fields[29]))||(submitCheckboxFieldValidate(fields[30]))||(submitCheckboxFieldValidate(fields[31])))){
				
				document.getElementById('joistedMasonrySpan').className = 'errorStyleSpan';
				document.getElementById('nonCombustibleSpan').className = 'errorStyleSpan';
			 	document.getElementById('masonryCombustiblesSpan').className = 'errorStyleSpan';
				
				validation = false;
				
			} else {
				document.getElementById('joistedMasonrySpan').className = 'correctStyle';
				document.getElementById('nonCombustibleSpan').className = 'correctStyle';
			 	document.getElementById('masonryCombustiblesSpan').className = 'correctStyle';		
			}
			
			
			if (validation == false){
				alert('Required Fields Not Completed Validly');
				return false;
			} else {
				enableAddressFields('quoteForm', 'LocAddSame');
				return true;	// form can be submitted
			}
		}
					
	function disableEnterKey(e)
	{
		 var key;	 
		 if(window.event)
			  key = window.event.keyCode; //IE
		 else
			  key = e.which; //firefox	 
	
		 return (key != 13);
	}
 
	
		
	</script> 
	


This post has been edited by S.R.K.: 19 November 2009 - 07:30 AM

Was This Post Helpful? 0
  • +
  • -

#6 S.R.K.  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 20
  • Joined: 15-September 09

Re: Form Submits Before JavaScript Validation

Posted 19 November 2009 - 07:31 AM

Form HTML
<div class="sub1head">QUICK QUOTE FORM</div> 
	<br/> 
		<div class="sub1text"> 
			   <p> Information about form...blah, blah, blah</p> 
		<p class="sub1head">Submit Request Online </p> 
						<form name="quoteForm" method="post" action="QuickQuoteForm.aspx" id="quoteForm"> 
<div> 
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE4MTI0NDc1ODUPZBYCAgEPZBYIAg0PEA9kFgIeB29uQ2xpY2sFM2NvbXBsZXRlQWRkcmVzcygncXVvdGVGb3JtJywnTG9jQWRkU2FtZScsICdpbkZvcm0nKWRkZAIbDw9kFgIeBm9uQmx1cgUmdmFsaWRhdGVGaWVsZCgnZW1haWxBZGRyZXNzJywgJ0VtYWlsJylkAi0PEA9kFgIfAAU0ZW5hYmxlVGV4dGJveCgncXVvdGVGb3JtJywnT3RoZXInLCdvdGhlclByb2ZDZW50ZXInKWRkZAJDDw9kFgIeB29uRm9jdXMFaGNvbXBsZXRlQWRkcmVzcygncXVvdGVGb3JtJywgJ0xvY0FkZFNhbWUnLCdvblN1Ym1pdCcpOyB2YWxpZGF0ZUZvcm0oJ3F1b3RlRm9ybScpOyBibHVyQnV0dG9uKCdTdWJtaXQnKTsgZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WDAUKTG9jQWRkU2FtZQUJc2VsZlNlcnZlBQdleHRPbmx5BQtmdWxsU2VydmljZQUDZ2FzBQRsdWJlBQljb252U3RvcmUFCWRldGFpbGluZwUFT3RoZXIFDmpvaXN0ZWRNYXNvbnJ5BQ5ub25Db21idXN0aWJsZQUSbWFzb25yeUNvbWJ1c3RpYmxlTfD+TcWr4pI4rMWTZyIOFxfBBaE=" /> 

<table width="100%"  border="0" cellspacing="0" cellpadding="0"> 
 
	<tr> 
		<td width="112" class="sub3text">Car Wash Name*</td> 
		<td colspan="3"> 
			<input name="carWashName" type="text" id="carWashName" name="carWashName" style="width:130px;" /> 
		</td> 
	</tr> 
	<tr> 
		<td class="sub3text">Contact name*</td> 
		<td colspan="3"> 
			<input name="contactName" type="text" id="contactName" name="contactName" style="width:130px;" /> 
		</td> 
	</tr> 

	<tr> 
		<td valign="top" class="sub3text"> </td> 
		<td colspan="3"> </td> 
	</tr> 
	<tr> 
		<td valign="top" class="sub3text">Mailing Information*</td> 
		<td colspan="3"> </td> 
	</tr> 

	<tr> 
		<td valign="top" class="sub3text">Address</td> 
		<td colspan="3"> 
			<input name="mailAddress" type="text" id="mailAddress" name="mailAddress" style="width:130px;" /> 
		</td> 
	</tr> 
	<tr> 
		<td valign="top" class="sub3text">City, St, Zip</td> 
		<td colspan="3"> 
			<table width="100%"  border="0" cellspacing="0" cellpadding="0"> 

				<tr> 
					<td width="65"> 
						<input name="mailCity" type="text" id="mailCity" name="mailCity" style="width:130px;" /> 
					</td> 
					<td width="10"> </td> 
					<td width="15"> 
						<input name="mailState" type="text" maxlength="2" id="mailState" name="mailState" style="width:25px;" /> 
					</td> 
					<td width="10"> </td> 
					<td> 
						<input name="mailZip" type="text" maxlength="10" id="mailZip" name="mailZip" style="width:75px;" /> 
					</td> 
				</tr> 
			</tr>	
		</table> 

	</td> 

	<tr> 
		<td valign="top" class="sub3text"> </td> 
		<td colspan="3"> </td> 
	</tr> 
	<tr> 
		<td colspan="2" valign="middle" class="sub3text"> 
			Location Information* (Same as Mailing  <span name="LocAddSame"><input id="LocAddSame" type="checkbox" name="LocAddSame" onclick="completeAddress('quoteForm','LocAddSame', 'inForm');" /></span>)
		</td> 
	</tr> 
	<tr> 

		<td valign="top" class="sub3text">Address</td> 
		<td colspan="3"> 
			<input name="locAddress" type="text" id="locAddress" name="locAddress" style="width:130px;" /> 
		</td> 
	</tr> 
	<tr> 
		<td valign="top" class="sub3text">City, St, Zip</td> 
		<td colspan="3"> 
			<table width="100%"  border="0" cellspacing="0" cellpadding="0"> 
				<tr> 
					<td width="65"> 
						<input name="locCity" type="text" id="locCity" name="locCity" style="width:130px;" /> 
					</td> 

					<td width="10"> </td> 
					<td width="15"> 
						<input name="locState" type="text" maxlength="2" id="locState" name="locState" style="width:25px;" /> 
					</td> 
					<td width="10"> </td> 
					<td> 
						<input name="locZip" type="text" maxlength="10" id="locZip" name="locZip" style="width:75px;" /> 
					</td> 
				</tr> 
			</table> 
		</td> 
	</tr> 
	<tr> 
		<td valign="top" class="sub3text"> </td> 
		<td colspan="3"> </td> 
		<td valign="top" class="sub3text"> </td> 

		<td colspan="3"> </td> 
	</tr> 
	<tr> 
		<td valign="top" class="sub3text">Phone Number*</td> 
		<td colspan="3"> 
			<table width="100%" border="0" cellspacing="0" cellpadding="0"> 
				<tr> 
					<td width="90"> 
						<input name="phone" type="text" id="phone" name="phone" style="width:130px;" /> 
					</td> 
				</tr> 

			</table> 
		</td> 
	</tr> 
	<tr> 
		<td valign="top" class="sub3text">Fax</td> 
		<td colspan="3"> 

			<table width="100%" border="0" cellspacing=""0="0" cellpadding="0"> 
				<tr> 
					<td width="90"> 
						<input name="fax" type="text" id="fax" name="fax" style="width:130px;" /> 
					</td> 
					<td width="90" align="center" nowrap="" class="sub3text">Email Address*</td> 

					<td width="90"> 
						<input name="Email" type="text" id="Email" name="email" onblur="validateField('emailAddress', 'Email')" style="width:130px;" /> 
					</td> 
					<td width="50" align="center" nowrap="" class="sub3text"></td> 
				</tr> 


			</table> 
		</td> 
	</tr> 



	<tr> 
		<td valign="top"> </td> 
		<td colspan="3"> </td> 
	</tr> 
	<tr> 

		<td valign="top" class="sub3text">Website</td> 
		<td colspan="3"> 
			<input name="website" type="text" id="website" name="website" style="width:130px;" /> 
		</td> 
	</tr> 
	<tr> 
		<td valign="top" class="sub3text"> </td> 
		<td colspan="3"> </td> 
	</tr> 
	<tr> 

		<td valign="top" class="sub3text">Car Wash Type*:</td> 
		<td valign="top" width="160" class="sub3text"> 
		   <span id="selfServeSpan"> <span name="selfServe"><input id="selfServe" type="checkbox" name="selfServe" /></span></span>Self Service 
		</td> 
		<td width="145" class="sub3text"> 
			<span id="extOnlySpan"><span name="extOnly"><input id="extOnly" type="checkbox" name="extOnly" /></span></span>Exterior Only
		</td> 
		<td width="145" class="sub3text"> 
			<span id="fullServiceSpan"><span name="fullService"><input id="fullService" type="checkbox" name="fullService" /></span></span>Full Service
		</td> 
	</tr> 
	<tr> 
		<td valign="top" class="sub3text"> </td> 

		<td valign="top"> </td> 
		<td> </td> 
		<td> </td> 
	</tr> 
	<tr> 
		<td valign="top" class="sub3text">Profit Centers*:</td> 
		<td valign="top" width="90" class="sub3text"> 
			<span id="gasSpan"><span name="gas"><input id="gas" type="checkbox" name="gas" /></span></span>Gas
		</td> 
		<td width="50" class="sub3text"> 
			<span id="lubeSpan"><span name="lube"><input id="lube" type="checkbox" name="lube" /></span></span>Lube
		</td> 

		<td width="130" class="sub3text"> 
			<span id="convStoreSpan"><span name="convStore"><input id="convStore" type="checkbox" name="convStore" /></span></span>Convenience Store
		</td> 
	</tr> 
	<tr> 
		<td valign="top" class="sub3text"> </td> 
		<td width="90" class="sub3text"> 
			<span id="detailingSpan"><span name="detailing"><input id="detailing" type="checkbox" name="detailing" /></span></span>Detailing
		</td> 
		<td colspan="2" valign="top" class="sub3text" class="sub3text"> 
			<span id="otherSpan"><span name="other"><input id="Other" type="checkbox" name="Other" onclick="enableTextbox('quoteForm','Other','otherProfCenter');" /></span></span> 
			Other<input name="otherProfCenter" type="text" id="otherProfCenter" name="otherProfCenter" style="visibility:hidden" /> 
		</td> 
	</tr> 

	<tr> 
		<td valign="top" class="sub3text"> </td> 
		<td colspan="3"> </td> 
	</tr> 
	<tr> 
		<td valign="top" class="sub3text"> </td> 
		<td colspan="3"> </td> 
	</tr> 
	<tr> 

		<td valign="top" nowrap="" class="sub3text">Location Information</td> 
		<td colspan="3"> </td> 
	</tr> 
	<tr> 
		<td valign="top" nowrap="" class="sub3text" width="125">Policy Renewal Date</td> 
		<td width="130"> 
			<input name="renewalDate" type="text" id="renewalDate" name="renewalDate" style="width:130px;" /> 
		</td> 
		<td class="sub3text" width="160">Building Replacement Cost*</td> 

		<td width="130"> 
			<input name="buildingReplaceCost" type="text" id="buildingReplaceCost" name="buildingReplaceCost" style="width:130px;" /> 
		</td> 
	</tr> 
	<tr> 
		<td valign="top" nowrap="" class="sub3text" width="125">Equipment Cost</td> 
		<td width="130"> 
			<input name="equipCost" type="text" id="equipCost" name="equipCost" style="width:130px;" /> 
		</td> 
		<td nowrap="" class="sub3text" width="167">Contents Replacement Cost </td> 
		<td width="130"> 
			<input name="contentReplaceCost" type="text" id="contentReplaceCost" name="contentReplaceCost" style="width:130px;" /> 
		</td> 
	</tr> 
	<tr> 
		<td valign="top" nowrap="" class="sub3text"> </td> 

		<td valign="top" nowrap=""> </td> 
		<td nowrap=""> </td> 
		<td nowrap=""> </td> 
	</tr> 
	<tr> 
		<td valign="top" nowrap="" class="sub3text">Construction Type*:</td> 
		<td width="137" valign="top" nowrap="" class="sub3text"> 
			<span id="joistedMasonrySpan"><span name="joistedMasonry"><input id="joistedMasonry" type="checkbox" name="joistedMasonry" /></span></span>Joisted-Masonry
		</td> 

		<td width="137" nowrap="" class="sub3text"> 
			<span id="nonCombustibleSpan"><span name="nonCombustible"><input id="nonCombustible" type="checkbox" name="nonCombustible" /></span></span>Non-Combustible
		</td> 
		<td width="144" nowrap="" class="sub3text"> 
			<span id="masonryCombustiblesSpan"><span name="masonryCombustible"><input id="masonryCombustible" type="checkbox" name="masonryCombustible" /></span></span>Masonry-Combustible
		</td> 
	</tr> 
	<tr> 
		<td valign="top" class="sub3text"> </td> 
		<td colspan="1"> </td> 

		<td valign="top" class="sub3text"> </td> 
		<td colspan="1"> </td> 
	</tr> 
	<tr> 
		<td valign="top" class="sub3text">Annual Receipts*</td> 
		<td colspan="1"> 
			<input name="annualReceipts" type="text" id="annualReceipts" name="annualReceipts" style="width:130px;" /> 
		</td> 
		<td valign="top" class="sub3text" width="144" align="center">Year Built*</td> 
		<td colspan="1"> 
			<input name="yearBuilt" type="text" id="yearBuilt" name="yearBuilt" style="width:130px;" /> 
		</td> 

	</tr> 
	<tr> 
		<td valign="top" class="sub3text"> </td> 
		<td colspan="3"> </td> 
	</tr> 
	<tr> 
		<td valign="top" class="sub3text">*Required Fields</td> 
		<td colspan="3"> </td> 

	</tr> 
	<tr> 
		<td valign="top"> </td> 
		<td> 
			<input type="submit" name="Submit" value="Submit" id="Submit" onfocus="completeAddress('quoteForm', 'LocAddSame','onsubmit'); validateForm('quoteForm'); blurButton('Submit'); " /> 
		</td> 
	</tr> 
</table> 

<div> 



Thanks!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1