We help IT Professionals succeed at work.

Selected in an option list

Richard Korts
on
79 Views
Last Modified: 2017-03-17
See this code:
<option value="">--- Select City ---</option>
					
			<option value="Alvin" >Alvin</option>
				
			
			<option value="Baytown" >Baytown</option>
				
			
			<option value="College Station" >College Station</option>
				
			
			<option value="Conroe" >Conroe</option>
				
			
			<option value="Fort Bend County" >Fort Bend County</option>
				
			
			<option value="Friendswood" >Friendswood</option>
				
			
			<option value="Fulshear" >Fulshear</option>
				
			
			<option value="Georgetown " >Georgetown </option>
				
			
			<option value="Houston" selected>Houston</option>
				
			
			<option value="Katy" >Katy</option>
				
			
			<option value="Municipal District Services" >Municipal District Services</option>
				
			
			<option value="Pasadena" >Pasadena</option>
				
			
			<option value="Pearland" >Pearland</option>
				
			
			<option value="Richmond" >Richmond</option>
				
			
			<option value="Sugar Land" >Sugar Land</option>
				
			
			<option value="The Woodlands" >The Woodlands</option>
				
			
			<option value="Tomball" >Tomball</option>
				
			
			</select></div>

Open in new window


Clearly the intent is to have "Houston" selected. Nothing is selected.

In a prior select element on the same page (not shown) Georgetown was marked as selected and it showed.

The browser is FireFox.

I have had this kind of inconsistent behavior before.

Please don't tell me it has to be selected = 'selected' because that is NOT consistent.

Why is Houston NOT shown as selected?
Comment
Watch Question

try this :

<select>


<option value="">--- Select City ---</option>
					
			<option value="Alvin" >Alvin</option>
				
			
			<option value="Baytown" >Baytown</option>
				
			
			<option value="College Station" >College Station</option>
				
			
			<option value="Conroe" >Conroe</option>
				
			
			<option value="Fort Bend County" >Fort Bend County</option>
				
			
			<option value="Friendswood" >Friendswood</option>
				
			
			<option value="Fulshear" >Fulshear</option>
				
			
			<option value="Georgetown " >Georgetown </option>
				
			
			<option value="Houston" selected>Houston</option>
				
			
			<option value="Katy" >Katy</option>
				
			
			<option value="Municipal District Services" >Municipal District Services</option>
				
			
			<option value="Pasadena" >Pasadena</option>
				
			
			<option value="Pearland" >Pearland</option>
				
			
			<option value="Richmond" >Richmond</option>
				
			
			<option value="Sugar Land" >Sugar Land</option>
				
			
			<option value="The Woodlands" >The Woodlands</option>
				
			
			<option value="Tomball" >Tomball</option>
				
			
		</select>

Open in new window

Richard KortsBusiness Owner / Chief Developer

Author

Commented:
I don't see the difference.

Are you suggesting I did not have <select> before the <options> list?

The line of html just before the code I included is:
<div class="col-xs-2" style="padding-top:10px;"><select name="clc22">

Open in new window

Here is a working sample I don't see where is the error...
Richard KortsBusiness Owner / Chief Developer

Author

Commented:
This is a small part of a more complex situation; the HTML code is not hard coded; it is created by php on the server.

I am not surprised that a simple piece of html that includes ONLY that select element works.

Do you want me to include the ENTIRE html for that page? It is long & tedious but might give a clue.

Thanks,

Richard
Put your code and let's see where is the issue.
Richard KortsBusiness Owner / Chief Developer

Author

Commented:
Full code:
<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
    <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

    <script src="//code.jquery.com/jquery-1.10.2.js"></script>
    <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
    <link rel="stylesheet" href="/resources/demos/style.css">

    <title>Backflow Assembly & Tester Information </title>
    <style>
        .nopadding {
            padding: 0 !important;
            margin: 0 !important;
        }
        
        .wrapper {
            max-width: 767px;
            min-width: 480px;
            margin: 0 auto;
        }
		input:not([type="submit"]), select {
    width: 100%;
	}

    </style>
	<script>
	tstr = new Array();
	lic = new Array();
	nu = ;
		
	tp = "u";
	function chk_vals() {
		if (document.st.tname1.value == "" || document.st.tsl1.value == "" || document.st.tlexd1.value == "" || document.st.tgmm1.value == "" || document.st.tsn1.value == "" || document.st.tgcd1.value == "") {
			alert("Data for at least one tester is required.");
			return false;
		}	

		return true;
	}
	</script>
	<script>
  
  $(function() {
    $( "#datepickercd1" ).datepicker();
  });
  $(function() {
    $( "#datepickerle1" ).datepicker();
  });
  $(function() {
    $( "#datepickercd2" ).datepicker();
  });
  $(function() {
    $( "#datepickerle2" ).datepicker();
  });
  $(function() {
    $( "#datepickercd3" ).datepicker();
  });
  $(function() {
    $( "#datepickerle3" ).datepicker();
  });
  $(function() {
    $( "#datepickercd4" ).datepicker();
  });
  $(function() {
    $( "#datepickerle4" ).datepicker();
  });
</script>
</head>	
<body>
<div class="wrapper">
<form method="POST" name="st" action="proc_registern.php?tp=u" onSubmit="return chk_vals();">
<input type="hidden" id="resp">
<input type="hidden" name="pname" value="Richard Korts">
<input type="hidden" name="email" value="richardkorts@gmail.com">
<input type="hidden" name="pwd" value="Janetko1">
<input type="hidden" name="firm" value="RK Associates">
<input type="hidden" name="faddr" value="439 W. El Norte Pkwy">
<input type="hidden" name="fcity" value="Escondido">
<input type="hidden" name="fst" value="CA">
<input type="hidden" name="fzip" value="92026">
<input type="hidden" name="fphone" value="619-855-9192">
<div class="container-fluid" style="background-color: #F3D9AF;">
<div class="row" style="background-color: #F3D9AF;">
    <div class="col-xs-8 text-center col-xs-offset-2"><img src="images/bfp_logo_sm.jpg"></div>
</div>
<div class="row" style="background-color: #F3D9AF;">
       <div class="col-xs-8 text-center col-xs-offset-2" style="font-size:18px;"><b>Backflow Assembly & Test Report Testers - Update Information</b></div>
 </div>

<div class="row">
		<div class="col-xs-4" style="padding-top:10px;">Tester #1</div>
		<input type="hidden" name="tno1" value = "1">
	</div>
		
	<div class="row">
		<div class="col-xs-2 text-right" style="padding-top:10px;">Name:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tname1" value="Richard Korts"></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">State License:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tsl1" value="BPG-12098"></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">License Expire:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tlexd1" id="datepickerle1" value="06/09/2017"></div>
	</div>
	<div class="row">
		<div class="col-xs-2 text-right" style="padding-top:10px;">Test Guage Make / Model:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tgmm1" value="TG-Watts 543"></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">Serial No:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tsn1" value="6753090"></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">Calibration Date:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tgcd1" id="datepickercd1" value="12/12/2016"></div>
	</div>
	<div class="row">
		<div class="col-xs-8 col-xs-offset-2">City License Numbers (if applicable)</div>
	</div>
					
	<div class="row">
		<div class= "col-xs-2">&nbsp;</div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City 1:</div>	
		<div class="col-xs-2" style="padding-top:10px;"><select name="clc11">
		<option value="">--- Select City ---</option>
						
			<option value="Alvin" >Alvin</option>
				
			<option value="Baytown" >Baytown</option>
				
			<option value="College Station" >College Station</option>
				
			<option value="Conroe" >Conroe</option>
				
			<option value="Fort Bend County" >Fort Bend County</option>
				
			<option value="Friendswood" >Friendswood</option>
				
			<option value="Fulshear" >Fulshear</option>
				
			<option value="Georgetown " >Georgetown </option>
				
			<option value="Houston" selected>Houston</option>
				
			<option value="Katy" selected>Katy</option>
				
			<option value="Municipal District Services" selected>Municipal District Services</option>
				
			<option value="Pasadena" selected>Pasadena</option>
				
			<option value="Pearland" selected>Pearland</option>
				
			<option value="Richmond" selected>Richmond</option>
				
			<option value="Sugar Land" selected>Sugar Land</option>
				
			<option value="The Woodlands" selected>The Woodlands</option>
				
			<option value="Tomball" selected>Tomball</option>
			
			</select></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City Lic #:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="cln11" value="#744"></div>
	</div>	
	<div class="row">
		<div class= "col-xs-2">&nbsp;</div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City 2:</div>	
		<div class="col-xs-2" style="padding-top:10px;"><select name="clc12">
		<option value="">--- Select City ---</option>
							<option value="Alvin" >Alvin</option>
					<option value="Baytown" >Baytown</option>
					<option value="College Station" >College Station</option>
					<option value="Conroe" >Conroe</option>
					<option value="Fort Bend County" >Fort Bend County</option>
					<option value="Friendswood" >Friendswood</option>
					<option value="Fulshear" >Fulshear</option>
					<option value="Georgetown " >Georgetown </option>
					<option value="Houston" >Houston</option>
					<option value="Katy" >Katy</option>
					<option value="Municipal District Services" >Municipal District Services</option>
					<option value="Pasadena" >Pasadena</option>
					<option value="Pearland" >Pearland</option>
					<option value="Richmond" >Richmond</option>
					<option value="Sugar Land" >Sugar Land</option>
					<option value="The Woodlands" >The Woodlands</option>
					<option value="Tomball" >Tomball</option>
			
			</select></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City Lic #:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="cln12" value=""></div>
	</div>
	<div class="row">
		<div class= "col-xs-2">&nbsp;</div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City 3:</div>	
		<div class="col-xs-2" style="padding-top:10px;"><select name="clc13">
		<option value="">--- Select City ---</option>
				 		
			<option value="Alvin" >Alvin</option>
		 		
			<option value="Baytown" >Baytown</option>
		 		
			<option value="College Station" >College Station</option>
		 		
			<option value="Conroe" >Conroe</option>
		 		
			<option value="Fort Bend County" >Fort Bend County</option>
		 		
			<option value="Friendswood" >Friendswood</option>
		 		
			<option value="Fulshear" >Fulshear</option>
		 		
			<option value="Georgetown " >Georgetown </option>
		 		
			<option value="Houston" >Houston</option>
		 		
			<option value="Katy" >Katy</option>
		 		
			<option value="Municipal District Services" >Municipal District Services</option>
		 		
			<option value="Pasadena" >Pasadena</option>
		 		
			<option value="Pearland" >Pearland</option>
		 		
			<option value="Richmond" >Richmond</option>
		 		
			<option value="Sugar Land" >Sugar Land</option>
		 		
			<option value="The Woodlands" >The Woodlands</option>
		 		
			<option value="Tomball" >Tomball</option>
			
			</select></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City Lic #:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="cln13" value=""></div>
	</div>	 
	<div class="row">
		<div class="col-xs-4" style="padding-top:10px;">Tester #2</div>
		<input type="hidden" name="tno1" value = "1">
	</div>
		
	<div class="row">
		<div class="col-xs-2 text-right" style="padding-top:10px;">Name:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tname2" value="Steve Korts"></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">State License:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tsl2" value="xyz98765"></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">License Expire:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tlexd2" id="datepickerle2" value="07/14/2017"></div>
	</div>
	<div class="row">
		<div class="col-xs-2 text-right" style="padding-top:10px;">Test Guage Make / Model:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tgmm2" value="Febco -XZ60"></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">Serial No:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tsn2" value="943075"></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">Calibration Date:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tgcd2" id="datepickercd2" value="01/11/2017"></div>
	</div>
	<div class="row">
		<div class="col-xs-8 col-xs-offset-2">City License Numbers (if applicable)</div>
	</div>
		ncl = 2<br>i = 0, cl[tester_no] = GT-087, cl[city'] = Georgetown <br>i = 1, cl[tester_no] = 597, cl[city'] = Houston<br>	<div class="row">
		<div class= "col-xs-2">&nbsp;</div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City 1:</div>	
		<div class="col-xs-2" style="padding-top:10px;"><select name="clc21">
		<option value="">--- Select City ---</option>
						
			<option value="Alvin" >Alvin</option>
				
				
			<option value="Baytown" >Baytown</option>
				
				
			<option value="College Station" >College Station</option>
				
				
			<option value="Conroe" >Conroe</option>
				
				
			<option value="Fort Bend County" >Fort Bend County</option>
				
				
			<option value="Friendswood" >Friendswood</option>
				
				
			<option value="Fulshear" >Fulshear</option>
				
				
			<option value="Georgetown " selected>Georgetown </option>
				
				
			<option value="Houston" >Houston</option>
				
				
			<option value="Katy" >Katy</option>
				
				
			<option value="Municipal District Services" >Municipal District Services</option>
				
				
			<option value="Pasadena" >Pasadena</option>
				
				
			<option value="Pearland" >Pearland</option>
				
				
			<option value="Richmond" >Richmond</option>
				
				
			<option value="Sugar Land" >Sugar Land</option>
				
				
			<option value="The Woodlands" >The Woodlands</option>
				
				
			<option value="Tomball" >Tomball</option>
				
			
			</select></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City Lic #:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="cln21" value="GT-087"></div>
	</div>	
	<div class="row">
		<div class= "col-xs-2">&nbsp;</div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City 2:</div>	
		<div class="col-xs-2" style="padding-top:10px;"><select name="clc22">
		<option value="">--- Select City ---</option>
					
			<option value="Alvin" >Alvin</option>
				
			
			<option value="Baytown" >Baytown</option>
				
			
			<option value="College Station" >College Station</option>
				
			
			<option value="Conroe" >Conroe</option>
				
			
			<option value="Fort Bend County" >Fort Bend County</option>
				
			
			<option value="Friendswood" >Friendswood</option>
				
			
			<option value="Fulshear" >Fulshear</option>
				
			
			<option value="Georgetown " >Georgetown </option>
				
			
			<option value="Houston" selected>Houston</option>
				
			
			<option value="Katy" >Katy</option>
				
			
			<option value="Municipal District Services" >Municipal District Services</option>
				
			
			<option value="Pasadena" >Pasadena</option>
				
			
			<option value="Pearland" >Pearland</option>
				
			
			<option value="Richmond" >Richmond</option>
				
			
			<option value="Sugar Land" >Sugar Land</option>
				
			
			<option value="The Woodlands" >The Woodlands</option>
				
			
			<option value="Tomball" >Tomball</option>
				
			
			</select></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City Lic #:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="cln22" value="597"></div>
	</div>
	<div class="row">
		<div class= "col-xs-2">&nbsp;</div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City 3:</div>	
		<div class="col-xs-2" style="padding-top:10px;"><select name="clc23">
		<option value="">--- Select City ---</option>
					
			<option value="Alvin" >Alvin</option>
				
			
			<option value="Baytown" >Baytown</option>
				
			
			<option value="College Station" >College Station</option>
				
			
			<option value="Conroe" >Conroe</option>
				
			
			<option value="Fort Bend County" >Fort Bend County</option>
				
			
			<option value="Friendswood" >Friendswood</option>
				
			
			<option value="Fulshear" >Fulshear</option>
				
			
			<option value="Georgetown " >Georgetown </option>
				
			
			<option value="Houston" >Houston</option>
				
			
			<option value="Katy" >Katy</option>
				
			
			<option value="Municipal District Services" >Municipal District Services</option>
				
			
			<option value="Pasadena" >Pasadena</option>
				
			
			<option value="Pearland" >Pearland</option>
				
			
			<option value="Richmond" >Richmond</option>
				
			
			<option value="Sugar Land" >Sugar Land</option>
				
			
			<option value="The Woodlands" >The Woodlands</option>
				
			
			<option value="Tomball" >Tomball</option>
				
			
			</select></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City Lic #:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="cln23" value=""></div>
	</div>	 
	<div class="row">
		<div class="col-xs-4" style="padding-top:10px;">Tester #3</div>
		<input type="hidden" name="tno1" value = "1">
	</div>
		
	<div class="row">
		<div class="col-xs-2 text-right" style="padding-top:10px;">Name:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tname3" value=""></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">State License:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tsl3" value=""></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">License Expire:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tlexd3" id="datepickerle3" value="//"></div>
	</div>
	<div class="row">
		<div class="col-xs-2 text-right" style="padding-top:10px;">Test Guage Make / Model:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tgmm3" value=""></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">Serial No:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tsn3" value=""></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">Calibration Date:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tgcd3" id="datepickercd3" value="//"></div>
	</div>
	<div class="row">
		<div class="col-xs-8 col-xs-offset-2">City License Numbers (if applicable)</div>
	</div>
			<div class="row">
		<div class= "col-xs-2">&nbsp;</div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City 1:</div>	
		<div class="col-xs-2" style="padding-top:10px;"><select name="clc31">
		<option value="">--- Select City ---</option>
						
			<option value="Alvin" >Alvin</option>
				
				
			<option value="Baytown" >Baytown</option>
				
				
			<option value="College Station" >College Station</option>
				
				
			<option value="Conroe" >Conroe</option>
				
				
			<option value="Fort Bend County" >Fort Bend County</option>
				
				
			<option value="Friendswood" >Friendswood</option>
				
				
			<option value="Fulshear" >Fulshear</option>
				
				
			<option value="Georgetown " >Georgetown </option>
				
				
			<option value="Houston" >Houston</option>
				
				
			<option value="Katy" >Katy</option>
				
				
			<option value="Municipal District Services" >Municipal District Services</option>
				
				
			<option value="Pasadena" >Pasadena</option>
				
				
			<option value="Pearland" >Pearland</option>
				
				
			<option value="Richmond" >Richmond</option>
				
				
			<option value="Sugar Land" >Sugar Land</option>
				
				
			<option value="The Woodlands" >The Woodlands</option>
				
				
			<option value="Tomball" >Tomball</option>
				
			
			</select></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City Lic #:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="cln31" value=""></div>
	</div>	
	<div class="row">
		<div class= "col-xs-2">&nbsp;</div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City 2:</div>	
		<div class="col-xs-2" style="padding-top:10px;"><select name="clc32">
		<option value="">--- Select City ---</option>
						
			<option value="Alvin" >Alvin</option>
							
			<option value="Baytown" >Baytown</option>
							
			<option value="College Station" >College Station</option>
							
			<option value="Conroe" >Conroe</option>
							
			<option value="Fort Bend County" >Fort Bend County</option>
							
			<option value="Friendswood" >Friendswood</option>
							
			<option value="Fulshear" >Fulshear</option>
							
			<option value="Georgetown " >Georgetown </option>
							
			<option value="Houston" >Houston</option>
							
			<option value="Katy" >Katy</option>
							
			<option value="Municipal District Services" >Municipal District Services</option>
							
			<option value="Pasadena" >Pasadena</option>
							
			<option value="Pearland" >Pearland</option>
							
			<option value="Richmond" >Richmond</option>
							
			<option value="Sugar Land" >Sugar Land</option>
							
			<option value="The Woodlands" >The Woodlands</option>
							
			<option value="Tomball" >Tomball</option>
						
			</select></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City Lic #:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="cln32" value=""></div>
	</div>
	<div class="row">
		<div class= "col-xs-2">&nbsp;</div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City 3:</div>	
		<div class="col-xs-2" style="padding-top:10px;"><select name="clc33">
		<option value="">--- Select City ---</option>
						
			<option value="Alvin" >Alvin</option>
				
			<option value="Baytown" >Baytown</option>
				
			<option value="College Station" >College Station</option>
				
			<option value="Conroe" >Conroe</option>
				
			<option value="Fort Bend County" >Fort Bend County</option>
				
			<option value="Friendswood" >Friendswood</option>
				
			<option value="Fulshear" >Fulshear</option>
				
			<option value="Georgetown " >Georgetown </option>
				
			<option value="Houston" >Houston</option>
				
			<option value="Katy" >Katy</option>
				
			<option value="Municipal District Services" >Municipal District Services</option>
				
			<option value="Pasadena" >Pasadena</option>
				
			<option value="Pearland" >Pearland</option>
				
			<option value="Richmond" >Richmond</option>
				
			<option value="Sugar Land" >Sugar Land</option>
				
			<option value="The Woodlands" >The Woodlands</option>
				
			<option value="Tomball" >Tomball</option>
			
			</select></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City Lic #:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="cln33" value=""></div>
	</div>	 
	
	
	<div class="row">
		<div class="col-xs-8 text-center col-xs-offset-2" style="padding-top:10px;"><input type="submit" value="Update Information"></div>
	</div>
	<div class="row">
		<div class="col-xs-8 col-xs-offset-2" style="padding-top:10px;">&nbsp;</div>
	</div>
            </div>
        </form>
    </div>
</body>

</html>	

Open in new window


The specific error occurs, lines 324 to 384. Note the prior one, line 290, displays properly.

Thanks!!
try this :
<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
    <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

    <script src="//code.jquery.com/jquery-1.10.2.js"></script>
    <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
    <link rel="stylesheet" href="/resources/demos/style.css">

    <title>Backflow Assembly & Tester Information </title>
    <style>
        .nopadding {
            padding: 0 !important;
            margin: 0 !important;
        }
        
        .wrapper {
            max-width: 767px;
            min-width: 480px;
            margin: 0 auto;
        }
		input:not([type="submit"]), select {
    width: 100%;
	}

    </style>
	<script>
	tstr = new Array();
	lic = new Array();
	nu = "";
		
	tp = "u";
	function chk_vals() {
		if (document.st.tname1.value == "" || document.st.tsl1.value == "" || document.st.tlexd1.value == "" || document.st.tgmm1.value == "" || document.st.tsn1.value == "" || document.st.tgcd1.value == "") {
			alert("Data for at least one tester is required.");
			return false;
		}	

		return true;
	}
	</script>
	<script>
  
  $(function() {
    $( "#datepickercd1" ).datepicker();
  });
  $(function() {
    $( "#datepickerle1" ).datepicker();
  });
  $(function() {
    $( "#datepickercd2" ).datepicker();
  });
  $(function() {
    $( "#datepickerle2" ).datepicker();
  });
  $(function() {
    $( "#datepickercd3" ).datepicker();
  });
  $(function() {
    $( "#datepickerle3" ).datepicker();
  });
  $(function() {
    $( "#datepickercd4" ).datepicker();
  });
  $(function() {
    $( "#datepickerle4" ).datepicker();
  });
</script>
</head>	
<body>
<div class="wrapper">
<form method="POST" name="st" action="proc_registern.php?tp=u" onSubmit="return chk_vals();">
<input type="hidden" id="resp">
<input type="hidden" name="pname" value="Richard Korts">
<input type="hidden" name="email" value="richardkorts@gmail.com">
<input type="hidden" name="pwd" value="Janetko1">
<input type="hidden" name="firm" value="RK Associates">
<input type="hidden" name="faddr" value="439 W. El Norte Pkwy">
<input type="hidden" name="fcity" value="Escondido">
<input type="hidden" name="fst" value="CA">
<input type="hidden" name="fzip" value="92026">
<input type="hidden" name="fphone" value="619-855-9192">
<div class="container-fluid" style="background-color: #F3D9AF;">
<div class="row" style="background-color: #F3D9AF;">
    <div class="col-xs-8 text-center col-xs-offset-2"><img src="images/bfp_logo_sm.jpg"></div>
</div>
<div class="row" style="background-color: #F3D9AF;">
       <div class="col-xs-8 text-center col-xs-offset-2" style="font-size:18px;"><b>Backflow Assembly & Test Report Testers - Update Information</b></div>
 </div>

<div class="row">
		<div class="col-xs-4" style="padding-top:10px;">Tester #1</div>
		<input type="hidden" name="tno1" value = "1">
	</div>
		
	<div class="row">
		<div class="col-xs-2 text-right" style="padding-top:10px;">Name:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tname1" value="Richard Korts"></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">State License:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tsl1" value="BPG-12098"></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">License Expire:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tlexd1" id="datepickerle1" value="06/09/2017"></div>
	</div>
	<div class="row">
		<div class="col-xs-2 text-right" style="padding-top:10px;">Test Guage Make / Model:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tgmm1" value="TG-Watts 543"></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">Serial No:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tsn1" value="6753090"></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">Calibration Date:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tgcd1" id="datepickercd1" value="12/12/2016"></div>
	</div>
	<div class="row">
		<div class="col-xs-8 col-xs-offset-2">City License Numbers (if applicable)</div>
	</div>
					
	<div class="row">
		<div class= "col-xs-2">&nbsp;</div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City 1:</div>	
		<div class="col-xs-2" style="padding-top:10px;"><select name="clc11">
		<option value="">--- Select City ---</option>
						
			<option value="Alvin" >Alvin</option>
				
			<option value="Baytown" >Baytown</option>
				
			<option value="College Station" >College Station</option>
				
			<option value="Conroe" >Conroe</option>
				
			<option value="Fort Bend County" >Fort Bend County</option>
				
			<option value="Friendswood" >Friendswood</option>
				
			<option value="Fulshear" >Fulshear</option>
				
			<option value="Georgetown " >Georgetown </option>
				
			<option value="Houston" selected>Houston</option>
				
			<option value="Katy" selected>Katy</option>
				
			<option value="Municipal District Services" selected>Municipal District Services</option>
				
			<option value="Pasadena" selected>Pasadena</option>
				
			<option value="Pearland" selected>Pearland</option>
				
			<option value="Richmond" selected>Richmond</option>
				
			<option value="Sugar Land" selected>Sugar Land</option>
				
			<option value="The Woodlands" selected>The Woodlands</option>
				
			<option value="Tomball" selected>Tomball</option>
			
			</select></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City Lic #:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="cln11" value="#744"></div>
	</div>	
	<div class="row">
		<div class= "col-xs-2">&nbsp;</div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City 2:</div>	
		<div class="col-xs-2" style="padding-top:10px;"><select name="clc12">
		<option value="">--- Select City ---</option>
							<option value="Alvin" >Alvin</option>
					<option value="Baytown" >Baytown</option>
					<option value="College Station" >College Station</option>
					<option value="Conroe" >Conroe</option>
					<option value="Fort Bend County" >Fort Bend County</option>
					<option value="Friendswood" >Friendswood</option>
					<option value="Fulshear" >Fulshear</option>
					<option value="Georgetown " >Georgetown </option>
					<option value="Houston" >Houston</option>
					<option value="Katy" >Katy</option>
					<option value="Municipal District Services" >Municipal District Services</option>
					<option value="Pasadena" >Pasadena</option>
					<option value="Pearland" >Pearland</option>
					<option value="Richmond" >Richmond</option>
					<option value="Sugar Land" >Sugar Land</option>
					<option value="The Woodlands" >The Woodlands</option>
					<option value="Tomball" >Tomball</option>
			
			</select></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City Lic #:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="cln12" value=""></div>
	</div>
	<div class="row">
		<div class= "col-xs-2">&nbsp;</div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City 3:</div>	
		<div class="col-xs-2" style="padding-top:10px;"><select name="clc13">
		<option value="">--- Select City ---</option>
				 		
			<option value="Alvin" >Alvin</option>
		 		
			<option value="Baytown" >Baytown</option>
		 		
			<option value="College Station" >College Station</option>
		 		
			<option value="Conroe" >Conroe</option>
		 		
			<option value="Fort Bend County" >Fort Bend County</option>
		 		
			<option value="Friendswood" >Friendswood</option>
		 		
			<option value="Fulshear" >Fulshear</option>
		 		
			<option value="Georgetown " >Georgetown </option>
		 		
			<option value="Houston" >Houston</option>
		 		
			<option value="Katy" >Katy</option>
		 		
			<option value="Municipal District Services" >Municipal District Services</option>
		 		
			<option value="Pasadena" >Pasadena</option>
		 		
			<option value="Pearland" >Pearland</option>
		 		
			<option value="Richmond" >Richmond</option>
		 		
			<option value="Sugar Land" >Sugar Land</option>
		 		
			<option value="The Woodlands" >The Woodlands</option>
		 		
			<option value="Tomball" >Tomball</option>
			
			</select></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City Lic #:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="cln13" value=""></div>
	</div>	 
	<div class="row">
		<div class="col-xs-4" style="padding-top:10px;">Tester #2</div>
		<input type="hidden" name="tno1" value = "1">
	</div>
		
	<div class="row">
		<div class="col-xs-2 text-right" style="padding-top:10px;">Name:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tname2" value="Steve Korts"></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">State License:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tsl2" value="xyz98765"></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">License Expire:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tlexd2" id="datepickerle2" value="07/14/2017"></div>
	</div>
	<div class="row">
		<div class="col-xs-2 text-right" style="padding-top:10px;">Test Guage Make / Model:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tgmm2" value="Febco -XZ60"></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">Serial No:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tsn2" value="943075"></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">Calibration Date:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tgcd2" id="datepickercd2" value="01/11/2017"></div>
	</div>
	<div class="row">
		<div class="col-xs-8 col-xs-offset-2">City License Numbers (if applicable)</div>
	</div>
		ncl = 2<br>i = 0, cl[tester_no] = GT-087, cl[city'] = Georgetown <br>i = 1, cl[tester_no] = 597, cl[city'] = Houston<br>	<div class="row">
		<div class= "col-xs-2">&nbsp;</div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City 1:</div>	
		<div class="col-xs-2" style="padding-top:10px;"><select name="clc21">
		<option value="">--- Select City ---</option>
						
			<option value="Alvin" >Alvin</option>
				
				
			<option value="Baytown" >Baytown</option>
				
				
			<option value="College Station" >College Station</option>
				
				
			<option value="Conroe" >Conroe</option>
				
				
			<option value="Fort Bend County" >Fort Bend County</option>
				
				
			<option value="Friendswood" >Friendswood</option>
				
				
			<option value="Fulshear" >Fulshear</option>
				
				
			<option value="Georgetown " selected>Georgetown </option>
				
				
			<option value="Houston" >Houston</option>
				
				
			<option value="Katy" >Katy</option>
				
				
			<option value="Municipal District Services" >Municipal District Services</option>
				
				
			<option value="Pasadena" >Pasadena</option>
				
				
			<option value="Pearland" >Pearland</option>
				
				
			<option value="Richmond" >Richmond</option>
				
				
			<option value="Sugar Land" >Sugar Land</option>
				
				
			<option value="The Woodlands" >The Woodlands</option>
				
				
			<option value="Tomball" >Tomball</option>
				
			
			</select></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City Lic #:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="cln21" value="GT-087"></div>
	</div>	
	<div class="row">
		<div class= "col-xs-2">&nbsp;</div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City 2:</div>	
		<div class="col-xs-2" style="padding-top:10px;"><select name="clc22">
		<option value="">--- Select City ---</option>
					
			<option value="Alvin" >Alvin</option>
				
			
			<option value="Baytown" >Baytown</option>
				
			
			<option value="College Station" >College Station</option>
				
			
			<option value="Conroe" >Conroe</option>
				
			
			<option value="Fort Bend County" >Fort Bend County</option>
				
			
			<option value="Friendswood" >Friendswood</option>
				
			
			<option value="Fulshear" >Fulshear</option>
				
			
			<option value="Georgetown " >Georgetown </option>
				
			
			<option value="Houston" selected>Houston</option>
				
			
			<option value="Katy" >Katy</option>
				
			
			<option value="Municipal District Services" >Municipal District Services</option>
				
			
			<option value="Pasadena" >Pasadena</option>
				
			
			<option value="Pearland" >Pearland</option>
				
			
			<option value="Richmond" >Richmond</option>
				
			
			<option value="Sugar Land" >Sugar Land</option>
				
			
			<option value="The Woodlands" >The Woodlands</option>
				
			
			<option value="Tomball" >Tomball</option>
				
			
			</select></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City Lic #:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="cln22" value="597"></div>
	</div>
	<div class="row">
		<div class= "col-xs-2">&nbsp;</div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City 3:</div>	
		<div class="col-xs-2" style="padding-top:10px;"><select name="clc23">
		<option value="">--- Select City ---</option>
					
			<option value="Alvin" >Alvin</option>
				
			
			<option value="Baytown" >Baytown</option>
				
			
			<option value="College Station" >College Station</option>
				
			
			<option value="Conroe" >Conroe</option>
				
			
			<option value="Fort Bend County" >Fort Bend County</option>
				
			
			<option value="Friendswood" >Friendswood</option>
				
			
			<option value="Fulshear" >Fulshear</option>
				
			
			<option value="Georgetown " >Georgetown </option>
				
			
			<option value="Houston" >Houston</option>
				
			
			<option value="Katy" >Katy</option>
				
			
			<option value="Municipal District Services" >Municipal District Services</option>
				
			
			<option value="Pasadena" >Pasadena</option>
				
			
			<option value="Pearland" >Pearland</option>
				
			
			<option value="Richmond" >Richmond</option>
				
			
			<option value="Sugar Land" >Sugar Land</option>
				
			
			<option value="The Woodlands" >The Woodlands</option>
				
			
			<option value="Tomball" >Tomball</option>
				
			
			</select></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City Lic #:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="cln23" value=""></div>
	</div>	 
	<div class="row">
		<div class="col-xs-4" style="padding-top:10px;">Tester #3</div>
		<input type="hidden" name="tno1" value = "1">
	</div>
		
	<div class="row">
		<div class="col-xs-2 text-right" style="padding-top:10px;">Name:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tname3" value=""></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">State License:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tsl3" value=""></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">License Expire:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tlexd3" id="datepickerle3" value="//"></div>
	</div>
	<div class="row">
		<div class="col-xs-2 text-right" style="padding-top:10px;">Test Guage Make / Model:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tgmm3" value=""></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">Serial No:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tsn3" value=""></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">Calibration Date:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="tgcd3" id="datepickercd3" value="//"></div>
	</div>
	<div class="row">
		<div class="col-xs-8 col-xs-offset-2">City License Numbers (if applicable)</div>
	</div>
			<div class="row">
		<div class= "col-xs-2">&nbsp;</div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City 1:</div>	
		<div class="col-xs-2" style="padding-top:10px;"><select name="clc31">
		<option value="">--- Select City ---</option>
						
			<option value="Alvin" >Alvin</option>
				
				
			<option value="Baytown" >Baytown</option>
				
				
			<option value="College Station" >College Station</option>
				
				
			<option value="Conroe" >Conroe</option>
				
				
			<option value="Fort Bend County" >Fort Bend County</option>
				
				
			<option value="Friendswood" >Friendswood</option>
				
				
			<option value="Fulshear" >Fulshear</option>
				
				
			<option value="Georgetown " >Georgetown </option>
				
				
			<option value="Houston" >Houston</option>
				
				
			<option value="Katy" >Katy</option>
				
				
			<option value="Municipal District Services" >Municipal District Services</option>
				
				
			<option value="Pasadena" >Pasadena</option>
				
				
			<option value="Pearland" >Pearland</option>
				
				
			<option value="Richmond" >Richmond</option>
				
				
			<option value="Sugar Land" >Sugar Land</option>
				
				
			<option value="The Woodlands" >The Woodlands</option>
				
				
			<option value="Tomball" >Tomball</option>
				
			
			</select></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City Lic #:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="cln31" value=""></div>
	</div>	
	<div class="row">
		<div class= "col-xs-2">&nbsp;</div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City 2:</div>	
		<div class="col-xs-2" style="padding-top:10px;"><select name="clc32">
		<option value="">--- Select City ---</option>
						
			<option value="Alvin" >Alvin</option>
							
			<option value="Baytown" >Baytown</option>
							
			<option value="College Station" >College Station</option>
							
			<option value="Conroe" >Conroe</option>
							
			<option value="Fort Bend County" >Fort Bend County</option>
							
			<option value="Friendswood" >Friendswood</option>
							
			<option value="Fulshear" >Fulshear</option>
							
			<option value="Georgetown " >Georgetown </option>
							
			<option value="Houston" >Houston</option>
							
			<option value="Katy" >Katy</option>
							
			<option value="Municipal District Services" >Municipal District Services</option>
							
			<option value="Pasadena" >Pasadena</option>
							
			<option value="Pearland" >Pearland</option>
							
			<option value="Richmond" >Richmond</option>
							
			<option value="Sugar Land" >Sugar Land</option>
							
			<option value="The Woodlands" >The Woodlands</option>
							
			<option value="Tomball" >Tomball</option>
						
			</select></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City Lic #:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="cln32" value=""></div>
	</div>
	<div class="row">
		<div class= "col-xs-2">&nbsp;</div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City 3:</div>	
		<div class="col-xs-2" style="padding-top:10px;"><select name="clc33">
		<option value="">--- Select City ---</option>
						
			<option value="Alvin" >Alvin</option>
				
			<option value="Baytown" >Baytown</option>
				
			<option value="College Station" >College Station</option>
				
			<option value="Conroe" >Conroe</option>
				
			<option value="Fort Bend County" >Fort Bend County</option>
				
			<option value="Friendswood" >Friendswood</option>
				
			<option value="Fulshear" >Fulshear</option>
				
			<option value="Georgetown " >Georgetown </option>
				
			<option value="Houston" >Houston</option>
				
			<option value="Katy" >Katy</option>
				
			<option value="Municipal District Services" >Municipal District Services</option>
				
			<option value="Pasadena" >Pasadena</option>
				
			<option value="Pearland" >Pearland</option>
				
			<option value="Richmond" >Richmond</option>
				
			<option value="Sugar Land" >Sugar Land</option>
				
			<option value="The Woodlands" >The Woodlands</option>
				
			<option value="Tomball" >Tomball</option>
			
			</select></div>
		<div class="col-xs-2 text-right" style="padding-top:10px;">City Lic #:</div>
		<div class="col-xs-2" style="padding-top:10px;"><input type="text" name="cln33" value=""></div>
	</div>	 
	
	
	<div class="row">
		<div class="col-xs-8 text-center col-xs-offset-2" style="padding-top:10px;"><input type="submit" value="Update Information"></div>
	</div>
	<div class="row">
		<div class="col-xs-8 col-xs-offset-2" style="padding-top:10px;">&nbsp;</div>
	</div>
            </div>
        </form>
    </div>
</body>

</html>	

Open in new window

CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Dave BaldwinFixer of Problems
CERTIFIED EXPERT
Most Valuable Expert 2014

Commented:
According to https://www.w3schools.com/tags/att_option_selected.asp , selected="selected" is only required for XHTML.  But I use it for all my code.
Richard KortsBusiness Owner / Chief Developer

Author

Commented:
To SniperCode Sheva

Can you tell me what you changed? I can't go through that entire code; I need to know where, specifically.
Richard KortsBusiness Owner / Chief Developer

Author

Commented:
To Snarf0001

I didn't think of that, clearly unmatched ' is generally a problem.

That stuff is a php echo to help me debug; I'll try it taking that out.

Thanks
Richard KortsBusiness Owner / Chief Developer

Author

Commented:
That did it; thanks for your keen observation. I had ignored that just because "that was only debug code".

Richard
CERTIFIED EXPERT

Commented:
No problem, glad you got it fixed.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.