6 Replies - 892 Views - Last Post: 17 August 2009 - 01:04 PM Rate Topic: -----

#1 rwtrwt2003  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 09-June 09

need to populate a field when a drop down menu is changed

Posted 17 August 2009 - 09:12 AM

Quote

I have a drop down menu that when i change it i need to have another field populated When the drop down menu is changed.
in the msql data base i have
ID,Vendor,Market,Emailaddress


Quote

Here is the code that I have


mysql_select_db($database_TechSupport, $TechSupport);
$query_getSwitches = "SELECT DISTINCT MailingList.Switch, MailingList.Vendor FROM MailingList ORDER BY MailingList.Vendor";
$getSwitches = mysql_query($query_getSwitches, $TechSupport) or die(mysql_error());
$row_getSwitches = mysql_fetch_assoc($getSwitches);
$totalRows_getSwitches = mysql_num_rows($getSwitches);


$colname_getVendor = "-1";
if (isset($_POST['Switch'])) {
  $colname_getVendor = $_POST['Switch'];
}
mysql_select_db($database_TechSupport, $TechSupport);
$query_getVendor = sprintf("SELECT * FROM MailingList WHERE MailingList.Switch = %s", GetSQLValueString($colname_getVendor, "text"));
$getVendor = mysql_query($query_getVendor, $TechSupport) or die(mysql_error());
$row_getVendor = mysql_fetch_assoc($getVendor);
$totalRows_getVendor = mysql_num_rows($getVendor);



<head>
<script type="text/javascript">
var Vendors = new Array();
<?php
		while($row_getVendor = mysql_fetch_assoc($getVendor))
	 	{
		   	print "Vendors['".$row_getVendor['Switch']."'] = '".$row_getVendor['Vendor']."';\n";
		}
	?>
function updateVendor(Switch) //Switch is current value of select box
	{
		if(Vendors[Switch]){
			document.getElementById('Vendor').value =  Vendors[Switch];
		}
		alert(Vendors);
	}
	document.write("<input name=Vendors type=text id=Vendors >");

	</script>
  <?php echo Vendors ?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Night Work</title>
</head>
<body>
<div align="center">
  <h1>Cell Load Night Work </h1>
  <p></p>
  <form action="<?php echo $editFormAction; ?>" name="form1" id="form1" method="POST" >
	<label><strong>Switch:
	<select name="Switch" id="Switch" onchange="updateVendor(this.options[this.SelectedIndex].value)">
	  <?php
			while ($row_getSwitches = mysql_fetch_assoc($getSwitches))
			{
				print "<option value='".$row_getSwitches['Switch']."'>".$row_getSwitches['Switch']."</option>\n";
			}
		?>
	</select>
	</strong></label>
	<label>Vendor
   <input name="Vendor" type="text" id="Vendor" />
	</label>



Is This A Good Question/Topic? 0
  • +

Replies To: need to populate a field when a drop down menu is changed

#2 Wimpy  Icon User is offline

  • R.I.P. ( Really Intelligent Person, right? )
  • member icon

Reputation: 159
  • View blog
  • Posts: 1,038
  • Joined: 02-May 09

Re: need to populate a field when a drop down menu is changed

Posted 17 August 2009 - 10:33 AM

What is the problem? Do you receive any errors? What does the errors say? Be more specific as to what your problem is! We won't do your homework for you! :v:
Was This Post Helpful? 0
  • +
  • -

#3 rwtrwt2003  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 09-June 09

Re: need to populate a field when a drop down menu is changed

Posted 17 August 2009 - 11:46 AM

When i click on the Switch Field and pick a Switch I want it to populate the Vendor field.
I cant get this to work. From some reason the Java code that I am useing is not working.
There is no errors that come up.

Any help is welcome. This is not Home Work.
Was This Post Helpful? 0
  • +
  • -

#4 Wimpy  Icon User is offline

  • R.I.P. ( Really Intelligent Person, right? )
  • member icon

Reputation: 159
  • View blog
  • Posts: 1,038
  • Joined: 02-May 09

Re: need to populate a field when a drop down menu is changed

Posted 17 August 2009 - 11:59 AM

Can you post the source code when generated by PHP? :)

View Postrwtrwt2003, on 17 Aug, 2009 - 08:46 PM, said:

When i click on the Switch Field and pick a Switch I want it to populate the Vendor field.
I cant get this to work. From some reason the Java code that I am useing is not working.
There is no errors that come up.

Any help is welcome. This is not Home Work.

Was This Post Helpful? 0
  • +
  • -

#5 rwtrwt2003  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 09-June 09

Re: need to populate a field when a drop down menu is changed

Posted 17 August 2009 - 12:02 PM

Here is the Source Code for the hole web page

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
var Vendors = new Array();
function updateVendor(Switch) //Switch is current value of select box
	{
		if(Vendors[Switch]){
			document.getElementById('Vendor').value =  Vendors[Switch];
		}
		alert(Vendors);
	}
	document.write("<input name=Vendors type=text id=Vendors >");

	</script>
  Vendors<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Night Work</title>
</head>
<script language="javascript" src="/Javascripts/calendar.js"></script>

<body>
<div align="center">

  <h1>Cell Load Night Work </h1>
  <p>&nbsp;</p>
  <form action="/TECHSUPPORT/CellLoad/NightWork/CellLoadNightWork.php?" name="form1" id="form1" method="POST" >
	<label><strong>Switch:
	<select name="Switch" id="Switch" onchange="updateVendor(this.options[this.SelectedIndex].value)">
	  <option value='AAALT'>AAALT</option>
<option value='AALTEST2'>AALTEST2</option>
<option value='Adelphi'>Adelphi</option>

<option value='Albuquerque'>Albuquerque</option>
<option value='Annapolis'>Annapolis</option>
<option value='Austin'>Austin</option>
<option value='Bakersfield'>Bakersfield</option>
<option value='Baltimore'>Baltimore</option>
<option value='Baton Rouge'>Baton Rouge</option>
<option value='Billerica'>Billerica</option>
<option value='Boise'>Boise</option>
<option value='Branchburg 1'>Branchburg 1</option>

<option value='Branchburg 2'>Branchburg 2</option>
<option value='Branchburg 3'>Branchburg 3</option>
<option value='Bridgeville 1'>Bridgeville 1</option>
<option value='Bridgeville 2'>Bridgeville 2</option>
<option value='Buffalo'>Buffalo</option>
<option value='Chantilly'>Chantilly</option>
<option value='Cicero'>Cicero</option>
<option value='Copperfield'>Copperfield</option>
<option value='Covington'>Covington</option>

<option value='Dallas'>Dallas</option>
<option value='Des Moines'>Des Moines</option>
<option value='E. Syracuse'>E. Syracuse</option>
<option value='East Tennessee'>East Tennessee</option>
<option value='El Paso'>El Paso</option>
<option value='Elgin'>Elgin</option>
<option value='Fargo'>Fargo</option>
<option value='Farmingdale 1'>Farmingdale 1</option>
<option value='Farmingdale 2'>Farmingdale 2</option>

<option value='Ft. Worth'>Ft. Worth</option>
<option value='Gilbert'>Gilbert</option>
<option value='Guion Rd 1'>Guion Rd 1</option>
<option value='Guion Rd 2'>Guion Rd 2</option>
<option value='Hickory Hills 2'>Hickory Hills 2</option>
<option value='Hickory Hills 3'>Hickory Hills 3</option>
<option value='Hillsboro'>Hillsboro</option>
<option value='Honolulu'>Honolulu</option>
<option value='Hooksett'>Hooksett</option>

<option value='Jacksonville 2'>Jacksonville 2</option>
<option value='Jersey City 1'>Jersey City 1</option>
<option value='Jersey City 2'>Jersey City 2</option>
<option value='Johnstown'>Johnstown</option>
<option value='Jupiter'>Jupiter</option>
<option value='LA 5E'>LA 5E</option>
<option value='Laight St'>Laight St</option>
<option value='LakeShore'>LakeShore</option>
<option value='Lansing'>Lansing</option>

<option value='Lenexa'>Lenexa</option>
<option value='Lonestar'>Lonestar</option>
<option value='Louisville'>Louisville</option>
<option value='Maple Shade 2'>Maple Shade 2</option>
<option value='Miami 2'>Miami 2</option>
<option value='Middle Tennessee'>Middle Tennessee</option>
<option value='Milwaukee 1'>Milwaukee 1</option>
<option value='Mineloa 2'>Mineloa 2</option>
<option value='Newport News'>Newport News</option>

<option value='North Greenbush 1'>North Greenbush 1</option>
<option value='North Greenbush 2'>North Greenbush 2</option>
<option value='Omaha'>Omaha</option>
<option value='Orlando'>Orlando</option>
<option value='Philadelphia'>Philadelphia</option>
<option value='Phoenix'>Phoenix</option>
<option value='Pittsburgh'>Pittsburgh</option>
<option value='Pleasanton 1'>Pleasanton 1</option>
<option value='Pleasanton 2'>Pleasanton 2</option>

<option value='Plymouth 1'>Plymouth 1</option>
<option value='Plymouth 2'>Plymouth 2</option>
<option value='Portland'>Portland</option>
<option value='Redmond Ridge'>Redmond Ridge</option>
<option value='Richmond'>Richmond</option>
<option value='Roanoke'>Roanoke</option>
<option value='Rochester 2'>Rochester 2</option>
<option value='Rockford'>Rockford</option>
<option value='Salisbury'>Salisbury</option>

<option value='Salt Lake City'>Salt Lake City</option>
<option value='San Francisco'>San Francisco</option>
<option value='Santa Clara'>Santa Clara</option>
<option value='Schertz'>Schertz</option>
<option value='Seattle'>Seattle</option>
<option value='Spokane'>Spokane</option>
<option value='Springfield'>Springfield</option>
<option value='St. Louis 1'>St. Louis 1</option>
<option value='St. Louis 2'>St. Louis 2</option>

<option value='Sunnyvale'>Sunnyvale</option>
<option value='Tacoma'>Tacoma</option>
<option value='Tampa'>Tampa</option>
<option value='Tampa 2'>Tampa 2</option>
<option value='Taunton'>Taunton</option>
<option value='Tempe'>Tempe</option>
<option value='Test 5'>Test 5</option>
<option value='test1'>test1</option>
<option value='Test4'>Test4</option>

<option value='Tucson'>Tucson</option>
<option value='Wallingford 1'>Wallingford 1</option>
<option value='Wallingford 2'>Wallingford 2</option>
<option value='Wayne 1'>Wayne 1</option>
<option value='Wayne 2'>Wayne 2</option>
<option value='West Jordan'>West Jordan</option>
<option value='West NYACK 1'>West NYACK 1</option>
<option value='West NYACK 2'>West NYACK 2</option>
<option value='West Roxbury 1'>West Roxbury 1</option>

<option value='West Roxbury 2'>West Roxbury 2</option>
<option value='West Tennessee'>West Tennessee</option>
<option value='Westborough'>Westborough</option>
<option value='Westpark'>Westpark</option>
<option value='Westside'>Westside</option>
<option value='WhiteStone 1'>WhiteStone 1</option>
<option value='WhiteStone 2'>WhiteStone 2</option>
<option value='Wilmington 1'>Wilmington 1</option>
<option value='Wilmington 2'>Wilmington 2</option>

<option value='Windsor'>Windsor</option>
<option value='Windsor 2'>Windsor 2</option>
<option value='Woodlawn 1'>Woodlawn 1</option>
<option value='Woodlawn 2'>Woodlawn 2</option>
<option value='Aurora 5'>Aurora 5</option>
<option value='Aurora 6'>Aurora 6</option>
<option value='Aurora 7'>Aurora 7</option>
<option value='Bismarck'>Bismarck</option>
<option value='Charleston'>Charleston</option>

<option value='Charlotte 1'>Charlotte 1</option>
<option value='Charlotte 2'>Charlotte 2</option>
<option value='Charlotte 3'>Charlotte 3</option>
<option value='Clinton 1'>Clinton 1</option>
<option value='Clinton 2'>Clinton 2</option>
<option value='Clinton MTX 1'>Clinton MTX 1</option>
<option value='Columbia'>Columbia</option>
<option value='Denver'>Denver</option>
<option value='Denver MTX 2'>Denver MTX 2</option>

<option value='Eugene'>Eugene</option>
<option value='Evansville 1'>Evansville 1</option>
<option value='Evansville 2'>Evansville 2</option>
<option value='Golden Valley'>Golden Valley</option>
<option value='Greensboro'>Greensboro</option>
<option value='Greenville 1'>Greenville 1</option>
<option value='Greenville 2'>Greenville 2</option>
<option value='Greenville 3'>Greenville 3</option>
<option value='Harrisburg'>Harrisburg</option>

<option value='Minnehaha 1'>Minnehaha 1</option>
<option value='Minnehaha 3'>Minnehaha 3</option>
<option value='Peoria'>Peoria</option>
<option value='Pittson'>Pittson</option>
<option value='Raleigh'>Raleigh</option>
<option value='Rock Springs'>Rock Springs</option>
<option value='Rocklin 3'>Rocklin 3</option>
<option value='Rocklin 5'>Rocklin 5</option>
<option value='Rocklin 7'>Rocklin 7</option>

<option value='Sacramento 25'>Sacramento 25</option>
<option value='Sacramento 5'>Sacramento 5</option>
<option value='South Bend'>South Bend</option>
<option value='Stockton'>Stockton</option>
<option value='test3'>test3</option>
<option value='Westminster'>Westminster</option>
<option value='AAANT'>AAANT</option>
<option value='Akron BSM 1'>Akron BSM 1</option>
<option value='Akron BSM 2'>Akron BSM 2</option>

<option value='Akron MTX 1'>Akron MTX 1</option>
<option value='Alpharetta BSM 1'>Alpharetta BSM 1</option>
<option value='Alpharetta BSM 2'>Alpharetta BSM 2</option>
<option value='Alpharetta MTX 1'>Alpharetta MTX 1</option>
<option value='Aurora MTX 3'>Aurora MTX 3</option>
<option value='Azusa'>Azusa</option>
<option value='Bloomington 1'>Bloomington 1</option>
<option value='Bloomington 2'>Bloomington 2</option>
<option value='Carbondale BSM 1'>Carbondale BSM 1</option>

<option value='Carbondale MTX 2'>Carbondale MTX 2</option>
<option value='Charleston BSM 1'>Charleston BSM 1</option>
<option value='Charleston MTX 1'>Charleston MTX 1</option>
<option value='Charlotte MTX 1'>Charlotte MTX 1</option>
<option value='Cincinnati BSM 1'>Cincinnati BSM 1</option>
<option value='Cincinnati BSM 2'>Cincinnati BSM 2</option>
<option value='Cincinnati MTX 1'>Cincinnati MTX 1</option>
<option value='Cleveland BSM 1'>Cleveland BSM 1</option>
<option value='Cleveland BSM 21'>Cleveland BSM 21</option>

<option value='Cleveland BSM 22'>Cleveland BSM 22</option>
<option value='Cleveland MTX 1'>Cleveland MTX 1</option>
<option value='Cleveland MTX 2'>Cleveland MTX 2</option>
<option value='Columbia MTX 1'>Columbia MTX 1</option>
<option value='Columbus BSM 1'>Columbus BSM 1</option>
<option value='Columbus BSM 2'>Columbus BSM 2</option>
<option value='Columbus MTX 1'>Columbus MTX 1</option>
<option value='Detroit BSM 101'>Detroit BSM 101</option>
<option value='Detroit BSM 102'>Detroit BSM 102</option>

<option value='Detroit BSM 111'>Detroit BSM 111</option>
<option value='Detroit BSM 121'>Detroit BSM 121</option>
<option value='Detroit BSM 51'>Detroit BSM 51</option>
<option value='Detroit BSM 52'>Detroit BSM 52</option>
<option value='Detroit BSM 81'>Detroit BSM 81</option>
<option value='Detroit BSM 91'>Detroit BSM 91</option>
<option value='Detroit BSM 92'>Detroit BSM 92</option>
<option value='Detroit MTX 10'>Detroit MTX 10</option>
<option value='Detroit MTX 11'>Detroit MTX 11</option>

<option value='Detroit MTX 12'>Detroit MTX 12</option>
<option value='Detroit MTX 5'>Detroit MTX 5</option>
<option value='Detroit MTX 6'>Detroit MTX 6</option>
<option value='Detroit MTX 8'>Detroit MTX 8</option>
<option value='Detroit MTX 9'>Detroit MTX 9</option>
<option value='Dothan BSM 1'>Dothan BSM 1</option>
<option value='Dothan MTX 1'>Dothan MTX 1</option>
<option value='Eugene MTX 1'>Eugene MTX 1</option>
<option value='Evansville MTX 1'>Evansville MTX 1</option>

<option value='Golden Valley MTX 1'>Golden Valley MTX 1</option>
<option value='Greensboro MTX 1'>Greensboro MTX 1</option>
<option value='Greenville MTX 1'>Greenville MTX 1</option>
<option value='Greenville MTX 7'>Greenville MTX 7</option>
<option value='Harrisburg MTX 1'>Harrisburg MTX 1</option>
<option value='Helena BSM 1'>Helena BSM 1</option>
<option value='Helena MTX 1'>Helena MTX 1</option>
<option value='Inland BSM 13'>Inland BSM 13</option>
<option value='Inland BSM 15'>Inland BSM 15</option>

<option value='Inland BSM 17'>Inland BSM 17</option>
<option value='Inland BSM 19'>Inland BSM 19</option>
<option value='Inland BSM 29'>Inland BSM 29</option>
<option value='Inland BSM 3'>Inland BSM 3</option>
<option value='Inland MTX 44'>Inland MTX 44</option>
<option value='Inland MTX 45'>Inland MTX 45</option>
<option value='Inland MTX 49'>Inland MTX 49</option>
<option value='Las Vegas BSM 1'>Las Vegas BSM 1</option>
<option value='Las Vegas BSM 2'>Las Vegas BSM 2</option>

<option value='Las Vegas MTX 1'>Las Vegas MTX 1</option>
<option value='Lewis Center BSM 1'>Lewis Center BSM 1</option>
<option value='Lewis Center BSM 2'>Lewis Center BSM 2</option>
<option value='Lewis Center MTX 1'>Lewis Center MTX 1</option>
<option value='Lewis Center MTX 2'>Lewis Center MTX 2</option>
<option value='Lonestar MTX 1'>Lonestar MTX 1</option>
<option value='Los Angeles BSM 1'>Los Angeles BSM 1</option>
<option value='Los Angeles BSM 11'>Los Angeles BSM 11</option>
<option value='Los Angeles BSM 3'>Los Angeles BSM 3</option>

<option value='Los Angeles BSM 9'>Los Angeles BSM 9</option>
<option value='Los Angeles MTX 41'>Los Angeles MTX 41</option>
<option value='Los Angeles MTX 43'>Los Angeles MTX 43</option>
<option value='Macon BSM 1'>Macon BSM 1</option>
<option value='Macon BSM 5'>Macon BSM 5</option>
<option value='Macon MTX 1'>Macon MTX 1</option>
<option value='Marina BSM 21'>Marina BSM 21</option>
<option value='Marina BSM 23'>Marina BSM 23</option>
<option value='Marina BSM 5'>Marina BSM 5</option>

<option value='Marina BSM 7'>Marina BSM 7</option>
<option value='Marina MTX 32'>Marina MTX 32</option>
<option value='Marina MTX 42'>Marina MTX 42</option>
<option value='Marina MTX 46'>Marina MTX 46</option>
<option value='Minnehaha MTX 1'>Minnehaha MTX 1</option>
<option value='Peoria MTX 1'>Peoria MTX 1</option>
<option value='Pittson MTX 1'>Pittson MTX 1</option>
<option value='Raleigh BSM 1'>Raleigh BSM 1</option>
<option value='Raleigh MTX 1'>Raleigh MTX 1</option>

<option value='Rocklin MTX 1'>Rocklin MTX 1</option>
<option value='San Diego BSM 1'>San Diego BSM 1</option>
<option value='San Diego BSM 3'>San Diego BSM 3</option>
<option value='San Diego BSM 5'>San Diego BSM 5</option>
<option value='San Diego MTX 48'>San Diego MTX 48</option>
<option value='San Diego MTX 50'>San Diego MTX 50</option>
<option value='Santa Anna BSM 2'>Santa Anna BSM 2</option>
<option value='Santa Anna BSM 4'>Santa Anna BSM 4</option>
<option value='Santa Anna BSM 6'>Santa Anna BSM 6</option>

<option value='Santa Anna BSM 8'>Santa Anna BSM 8</option>
<option value='Santa Anna MTX 31'>Santa Anna MTX 31</option>
<option value='Santa Anna MTX 51'>Santa Anna MTX 51</option>
<option value='Santa Anna MTX 52'>Santa Anna MTX 52</option>
<option value='Sioux Falls BSM 1'>Sioux Falls BSM 1</option>
<option value='Sioux Falls BSM 2'>Sioux Falls BSM 2</option>
<option value='Sioux Falls MTX 2'>Sioux Falls MTX 2</option>
<option value='South Bend MTX 1'>South Bend MTX 1</option>
<option value='Stockton MTX 1'>Stockton MTX 1</option>

<option value='Sugarloaf BSM 13'>Sugarloaf BSM 13</option>
<option value='Sugarloaf BSM 17'>Sugarloaf BSM 17</option>
<option value='Sugarloaf BSM 9'>Sugarloaf BSM 9</option>
<option value='Sugarloaf MTX 3'>Sugarloaf MTX 3</option>
<option value='Sugarloaf MTX 4'>Sugarloaf MTX 4</option>
<option value='test2'>test2</option>
<option value='Tustin BSM 25'>Tustin BSM 25</option>
<option value='Tustin BSM 27'>Tustin BSM 27</option>
<option value='Tustin MTX 47'>Tustin MTX 47</option>

	</select>
	</strong></label>
	<strong>
	<label>Person:
	<select name="Person" id="Person">
	  <option value='Larry Knight'>Larry Knight</option>
<option value='Christopher Shallcross'>Christopher Shallcross</option>
<option value='Paula Salisbury'>Paula Salisbury</option>
<option value='Ken Spatz'>Ken Spatz</option>

<option value='Operation Support Services'>Operation Support Services</option>
<option value='Switch'>Switch</option>
	</select>
	</label>
	</strong>
	<label>Vendor
   <input name="Vendor" type="text" id="Vendor" />
	</label>
<p><strong>
	  <label>Version
	  <input type="text" name="Version" id="Version" />

	  </label>
	  </strong></p>
	<p><strong>Date Completed: 
	
	 <input type="text" name="DATE" size="10" maxlength="10" value="" />
	 <a href="java script:void(0)" onclick="showCalendar(form1.DATE, 'yyyy-MM-DD', 'Choose Start Date')">
	 <img src="/Javascripts/CAL-icon.gif" width="16" height="16" alt="Click here to choose date" /></a>  
	</strong></p>
   <p><strong>
	  <label>Digital
	  <input name="Digital" type="text" id="Digital" onkeyup="cellcount(this.value)" />

	  </label>
	  <label>Total
	  <script type="text/javascript">
	  var cnt;
	  function cellcount(count)
	  {
		  var words = count.split(/\,/);
		cnt = words.length;
		var ele= document.getElementById('Total1');
		ele.value = cnt;
	  }
	  document.write("<input name=Total1 type=text id=Total1 size=4 >");
	  </script>
	  </label>
	  
	</strong></p>
	<p><strong>
	  <label>Evdo
	  <input type="text" name="EVDO" id="EVDO" onkeyup="evdocount(this.value)" />
	  </label>

	 
	  <label>Total
	   <script type="text/javascript">
	  var cnt;
	  function evdocount(count)
	  {
		  var words = count.split(/\,/);
		cnt = words.length;
		var ele= document.getElementById('Total2');
		ele.value = cnt;
	  }
	  document.write("<input name=Total2 type=text id=Total2 size=4 >");
	  </script>
	   </label>
		</strong></p>
	<p>
	  <strong>
	  <label>Comments</label>
	  </strong>

	  <label><br />
	  <textarea name="Comments" id="Comments" cols="80" rows="5"></textarea>
	  </label>
	</p>
	<p>
	  <label>
	  <input type="submit" name="button" id="button" value="Submit" />
	  </label>

	</p>
	
	<input name="hiddenField" type="hidden" id="hiddenField" value="" />
	<input type="hidden" name="MM_insert" value="form1" />
  </form>
  <p>&nbsp;</p>
</div>
</body>
</head>
</html>
</html>


Was This Post Helpful? 0
  • +
  • -

#6 Wimpy  Icon User is offline

  • R.I.P. ( Really Intelligent Person, right? )
  • member icon

Reputation: 159
  • View blog
  • Posts: 1,038
  • Joined: 02-May 09

Re: need to populate a field when a drop down menu is changed

Posted 17 August 2009 - 12:09 PM

The Vendors javascript array never gets populated by this code:
<?php
		while($row_getVendor = mysql_fetch_assoc($getVendor))
		 {
			   print "Vendors['".$row_getVendor['Switch']."'] = '".$row_getVendor['Vendor']."';\n";
		}
	?>
Check if the query fails or not! :)
Was This Post Helpful? 0
  • +
  • -

#7 rwtrwt2003  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 09-June 09

Re: need to populate a field when a drop down menu is changed

Posted 17 August 2009 - 01:04 PM

I got the Vendors java script array to populate

here is the new source code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
var Vendors = new Array();
Vendors['AAALT'] = 'LUCENT';
Vendors['AALTEST2'] = 'LUCENT';
Vendors['Adelphi'] = 'LUCENT';
Vendors['Albuquerque'] = 'LUCENT';
Vendors['Annapolis'] = 'LUCENT';
Vendors['Austin'] = 'LUCENT';
Vendors['Bakersfield'] = 'LUCENT';
Vendors['Baltimore'] = 'LUCENT';
Vendors['Baton Rouge'] = 'LUCENT';
Vendors['Billerica'] = 'LUCENT';
Vendors['Boise'] = 'LUCENT';
Vendors['Branchburg 1'] = 'LUCENT';
Vendors['Branchburg 2'] = 'LUCENT';
Vendors['Branchburg 3'] = 'LUCENT';
Vendors['Bridgeville 1'] = 'LUCENT';
Vendors['Bridgeville 2'] = 'LUCENT';
Vendors['Buffalo'] = 'LUCENT';
Vendors['Chantilly'] = 'LUCENT';
Vendors['Cicero'] = 'LUCENT';
Vendors['Copperfield'] = 'LUCENT';
Vendors['Covington'] = 'LUCENT';
Vendors['Dallas'] = 'LUCENT';
Vendors['Des Moines'] = 'LUCENT';
Vendors['E. Syracuse'] = 'LUCENT';
Vendors['East Tennessee'] = 'LUCENT';
Vendors['El Paso'] = 'LUCENT';
Vendors['Elgin'] = 'LUCENT';
Vendors['Fargo'] = 'LUCENT';
Vendors['Farmingdale 1'] = 'LUCENT';
Vendors['Farmingdale 2'] = 'LUCENT';
Vendors['Ft. Worth'] = 'LUCENT';
Vendors['Gilbert'] = 'LUCENT';
Vendors['Guion Rd 1'] = 'LUCENT';
Vendors['Guion Rd 2'] = 'LUCENT';
Vendors['Hickory Hills 2'] = 'LUCENT';
Vendors['Hickory Hills 3'] = 'LUCENT';
Vendors['Hillsboro'] = 'LUCENT';
Vendors['Honolulu'] = 'LUCENT';
Vendors['Hooksett'] = 'LUCENT';
Vendors['Jacksonville 2'] = 'LUCENT';
Vendors['Jersey City 1'] = 'LUCENT';
Vendors['Jersey City 2'] = 'LUCENT';
Vendors['Johnstown'] = 'LUCENT';
Vendors['Jupiter'] = 'LUCENT';
Vendors['LA 5E'] = 'LUCENT';
Vendors['Laight St'] = 'LUCENT';
Vendors['LakeShore'] = 'LUCENT';
Vendors['Lansing'] = 'LUCENT';
Vendors['Lenexa'] = 'LUCENT';
Vendors['Lonestar'] = 'LUCENT';
Vendors['Louisville'] = 'LUCENT';
Vendors['Maple Shade 2'] = 'LUCENT';
Vendors['Miami 2'] = 'LUCENT';
Vendors['Middle Tennessee'] = 'LUCENT';
Vendors['Milwaukee 1'] = 'LUCENT';
Vendors['Mineloa 2'] = 'LUCENT';
Vendors['Newport News'] = 'LUCENT';
Vendors['North Greenbush 1'] = 'LUCENT';
Vendors['North Greenbush 2'] = 'LUCENT';
Vendors['Omaha'] = 'LUCENT';
Vendors['Orlando'] = 'LUCENT';
Vendors['Philadelphia'] = 'LUCENT';
Vendors['Phoenix'] = 'LUCENT';
Vendors['Pittsburgh'] = 'LUCENT';
Vendors['Pleasanton 1'] = 'LUCENT';
Vendors['Pleasanton 2'] = 'LUCENT';
Vendors['Plymouth 1'] = 'LUCENT';
Vendors['Plymouth 2'] = 'LUCENT';
Vendors['Portland'] = 'LUCENT';
Vendors['Redmond Ridge'] = 'LUCENT';
Vendors['Richmond'] = 'LUCENT';
Vendors['Roanoke'] = 'LUCENT';
Vendors['Rochester 2'] = 'LUCENT';
Vendors['Rockford'] = 'LUCENT';
Vendors['Salisbury'] = 'LUCENT';
Vendors['Salt Lake City'] = 'LUCENT';
Vendors['San Francisco'] = 'LUCENT';
Vendors['Santa Clara'] = 'LUCENT';
Vendors['Schertz'] = 'LUCENT';
Vendors['Seattle'] = 'LUCENT';
Vendors['Spokane'] = 'LUCENT';
Vendors['Springfield'] = 'LUCENT';
Vendors['St. Louis 1'] = 'LUCENT';
Vendors['St. Louis 2'] = 'LUCENT';
Vendors['Sunnyvale'] = 'LUCENT';
Vendors['Tacoma'] = 'LUCENT';
Vendors['Tampa'] = 'LUCENT';
Vendors['Tampa 2'] = 'LUCENT';
Vendors['Taunton'] = 'LUCENT';
Vendors['Tempe'] = 'LUCENT';
Vendors['Test 5'] = 'LUCENT';
Vendors['test1'] = 'LUCENT';
Vendors['Test4'] = 'LUCENT';
Vendors['Tucson'] = 'LUCENT';
Vendors['Wallingford 1'] = 'LUCENT';
Vendors['Wallingford 2'] = 'LUCENT';
Vendors['Wayne 1'] = 'LUCENT';
Vendors['Wayne 2'] = 'LUCENT';
Vendors['West Jordan'] = 'LUCENT';
Vendors['West NYACK 1'] = 'LUCENT';
Vendors['West NYACK 2'] = 'LUCENT';
Vendors['West Roxbury 1'] = 'LUCENT';
Vendors['West Roxbury 2'] = 'LUCENT';
Vendors['West Tennessee'] = 'LUCENT';
Vendors['Westborough'] = 'LUCENT';
Vendors['Westpark'] = 'LUCENT';
Vendors['Westside'] = 'LUCENT';
Vendors['WhiteStone 1'] = 'LUCENT';
Vendors['WhiteStone 2'] = 'LUCENT';
Vendors['Wilmington 1'] = 'LUCENT';
Vendors['Wilmington 2'] = 'LUCENT';
Vendors['Windsor'] = 'LUCENT';
Vendors['Windsor 2'] = 'LUCENT';
Vendors['Woodlawn 1'] = 'LUCENT';
Vendors['Woodlawn 2'] = 'LUCENT';
Vendors['Aurora 5'] = 'MOTO';
Vendors['Aurora 6'] = 'MOTO';
Vendors['Aurora 7'] = 'MOTO';
Vendors['Bismarck'] = 'MOTO';
Vendors['Charleston'] = 'MOTO';
Vendors['Charlotte 1'] = 'MOTO';
Vendors['Charlotte 2'] = 'MOTO';
Vendors['Charlotte 3'] = 'MOTO';
Vendors['Clinton 1'] = 'MOTO';
Vendors['Clinton 2'] = 'MOTO';
Vendors['Clinton MTX 1'] = 'MOTO';
Vendors['Columbia'] = 'MOTO';
Vendors['Denver'] = 'MOTO';
Vendors['Denver MTX 2'] = 'MOTO';
Vendors['Eugene'] = 'MOTO';
Vendors['Evansville 1'] = 'MOTO';
Vendors['Evansville 2'] = 'MOTO';
Vendors['Golden Valley'] = 'MOTO';
Vendors['Greensboro'] = 'MOTO';
Vendors['Greenville 1'] = 'MOTO';
Vendors['Greenville 2'] = 'MOTO';
Vendors['Greenville 3'] = 'MOTO';
Vendors['Harrisburg'] = 'MOTO';
Vendors['Minnehaha 1'] = 'MOTO';
Vendors['Minnehaha 3'] = 'MOTO';
Vendors['Peoria'] = 'MOTO';
Vendors['Pittson'] = 'MOTO';
Vendors['Raleigh'] = 'MOTO';
Vendors['Rock Springs'] = 'MOTO';
Vendors['Rocklin 3'] = 'MOTO';
Vendors['Rocklin 5'] = 'MOTO';
Vendors['Rocklin 7'] = 'MOTO';
Vendors['Sacramento 25'] = 'MOTO';
Vendors['Sacramento 5'] = 'MOTO';
Vendors['South Bend'] = 'MOTO';
Vendors['Stockton'] = 'MOTO';
Vendors['test3'] = 'MOTO';
Vendors['Westminster'] = 'MOTO';
Vendors['AAANT'] = 'NORTEL';
Vendors['Akron BSM 1'] = 'NORTEL';
Vendors['Akron BSM 2'] = 'NORTEL';
Vendors['Akron MTX 1'] = 'NORTEL';
Vendors['Alpharetta BSM 1'] = 'NORTEL';
Vendors['Alpharetta BSM 2'] = 'NORTEL';
Vendors['Alpharetta MTX 1'] = 'NORTEL';
Vendors['Aurora MTX 3'] = 'NORTEL';
Vendors['Azusa'] = 'NORTEL';
Vendors['Bloomington 1'] = 'NORTEL';
Vendors['Bloomington 2'] = 'NORTEL';
Vendors['Carbondale BSM 1'] = 'NORTEL';
Vendors['Carbondale MTX 2'] = 'NORTEL';
Vendors['Charleston BSM 1'] = 'NORTEL';
Vendors['Charleston MTX 1'] = 'NORTEL';
Vendors['Charlotte MTX 1'] = 'NORTEL';
Vendors['Cincinnati BSM 1'] = 'NORTEL';
Vendors['Cincinnati BSM 2'] = 'NORTEL';
Vendors['Cincinnati MTX 1'] = 'NORTEL';
Vendors['Cleveland BSM 1'] = 'NORTEL';
Vendors['Cleveland BSM 21'] = 'NORTEL';
Vendors['Cleveland BSM 22'] = 'NORTEL';
Vendors['Cleveland MTX 1'] = 'NORTEL';
Vendors['Cleveland MTX 2'] = 'NORTEL';
Vendors['Columbia MTX 1'] = 'NORTEL';
Vendors['Columbus BSM 1'] = 'NORTEL';
Vendors['Columbus BSM 2'] = 'NORTEL';
Vendors['Columbus MTX 1'] = 'NORTEL';
Vendors['Detroit BSM 101'] = 'NORTEL';
Vendors['Detroit BSM 102'] = 'NORTEL';
Vendors['Detroit BSM 111'] = 'NORTEL';
Vendors['Detroit BSM 121'] = 'NORTEL';
Vendors['Detroit BSM 51'] = 'NORTEL';
Vendors['Detroit BSM 52'] = 'NORTEL';
Vendors['Detroit BSM 81'] = 'NORTEL';
Vendors['Detroit BSM 91'] = 'NORTEL';
Vendors['Detroit BSM 92'] = 'NORTEL';
Vendors['Detroit MTX 10'] = 'NORTEL';
Vendors['Detroit MTX 11'] = 'NORTEL';
Vendors['Detroit MTX 12'] = 'NORTEL';
Vendors['Detroit MTX 5'] = 'NORTEL';
Vendors['Detroit MTX 6'] = 'NORTEL';
Vendors['Detroit MTX 8'] = 'NORTEL';
Vendors['Detroit MTX 9'] = 'NORTEL';
Vendors['Dothan BSM 1'] = 'NORTEL';
Vendors['Dothan MTX 1'] = 'NORTEL';
Vendors['Eugene MTX 1'] = 'NORTEL';
Vendors['Evansville MTX 1'] = 'NORTEL';
Vendors['Golden Valley MTX 1'] = 'NORTEL';
Vendors['Greensboro MTX 1'] = 'NORTEL';
Vendors['Greenville MTX 1'] = 'NORTEL';
Vendors['Greenville MTX 7'] = 'NORTEL';
Vendors['Harrisburg MTX 1'] = 'NORTEL';
Vendors['Helena BSM 1'] = 'NORTEL';
Vendors['Helena MTX 1'] = 'NORTEL';
Vendors['Inland BSM 13'] = 'NORTEL';
Vendors['Inland BSM 15'] = 'NORTEL';
Vendors['Inland BSM 17'] = 'NORTEL';
Vendors['Inland BSM 19'] = 'NORTEL';
Vendors['Inland BSM 29'] = 'NORTEL';
Vendors['Inland BSM 3'] = 'NORTEL';
Vendors['Inland MTX 44'] = 'NORTEL';
Vendors['Inland MTX 45'] = 'NORTEL';
Vendors['Inland MTX 49'] = 'NORTEL';
Vendors['Las Vegas BSM 1'] = 'NORTEL';
Vendors['Las Vegas BSM 2'] = 'NORTEL';
Vendors['Las Vegas MTX 1'] = 'NORTEL';
Vendors['Lewis Center BSM 1'] = 'NORTEL';
Vendors['Lewis Center BSM 2'] = 'NORTEL';
Vendors['Lewis Center MTX 1'] = 'NORTEL';
Vendors['Lewis Center MTX 2'] = 'NORTEL';
Vendors['Lonestar MTX 1'] = 'NORTEL';
Vendors['Los Angeles BSM 1'] = 'NORTEL';
Vendors['Los Angeles BSM 11'] = 'NORTEL';
Vendors['Los Angeles BSM 3'] = 'NORTEL';
Vendors['Los Angeles BSM 9'] = 'NORTEL';
Vendors['Los Angeles MTX 41'] = 'NORTEL';
Vendors['Los Angeles MTX 43'] = 'NORTEL';
Vendors['Macon BSM 1'] = 'NORTEL';
Vendors['Macon BSM 5'] = 'NORTEL';
Vendors['Macon MTX 1'] = 'NORTEL';
Vendors['Marina BSM 21'] = 'NORTEL';
Vendors['Marina BSM 23'] = 'NORTEL';
Vendors['Marina BSM 5'] = 'NORTEL';
Vendors['Marina BSM 7'] = 'NORTEL';
Vendors['Marina MTX 32'] = 'NORTEL';
Vendors['Marina MTX 42'] = 'NORTEL';
Vendors['Marina MTX 46'] = 'NORTEL';
Vendors['Minnehaha MTX 1'] = 'NORTEL';
Vendors['Peoria MTX 1'] = 'NORTEL';
Vendors['Pittson MTX 1'] = 'NORTEL';
Vendors['Raleigh BSM 1'] = 'NORTEL';
Vendors['Raleigh MTX 1'] = 'NORTEL';
Vendors['Rocklin MTX 1'] = 'NORTEL';
Vendors['San Diego BSM 1'] = 'NORTEL';
Vendors['San Diego BSM 3'] = 'NORTEL';
Vendors['San Diego BSM 5'] = 'NORTEL';
Vendors['San Diego MTX 48'] = 'NORTEL';
Vendors['San Diego MTX 50'] = 'NORTEL';
Vendors['Santa Anna BSM 2'] = 'NORTEL';
Vendors['Santa Anna BSM 4'] = 'NORTEL';
Vendors['Santa Anna BSM 6'] = 'NORTEL';
Vendors['Santa Anna BSM 8'] = 'NORTEL';
Vendors['Santa Anna MTX 31'] = 'NORTEL';
Vendors['Santa Anna MTX 51'] = 'NORTEL';
Vendors['Santa Anna MTX 52'] = 'NORTEL';
Vendors['Sioux Falls BSM 1'] = 'NORTEL';
Vendors['Sioux Falls BSM 2'] = 'NORTEL';
Vendors['Sioux Falls MTX 2'] = 'NORTEL';
Vendors['South Bend MTX 1'] = 'NORTEL';
Vendors['Stockton MTX 1'] = 'NORTEL';
Vendors['Sugarloaf BSM 13'] = 'NORTEL';
Vendors['Sugarloaf BSM 17'] = 'NORTEL';
Vendors['Sugarloaf BSM 9'] = 'NORTEL';
Vendors['Sugarloaf MTX 3'] = 'NORTEL';
Vendors['Sugarloaf MTX 4'] = 'NORTEL';
Vendors['test2'] = 'NORTEL';
Vendors['Tustin BSM 25'] = 'NORTEL';
Vendors['Tustin BSM 27'] = 'NORTEL';
Vendors['Tustin MTX 47'] = 'NORTEL';
function updateVendor(Switch) //Switch is current value of select box
	{
		if(Vendors[Switch]){
			document.getElementById('Vendor').value =  Vendors[Switch];
		}
		alert(Vendors);
	}
	document.write("<input name=Vendors type=text id=Vendors >");

	</script>
  Vendors<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Night Work</title>
</head>
<script language="javascript" src="/Javascripts/calendar.js"></script>

<body>
<div align="center">

  <h1>Cell Load Night Work </h1>
  <p></p>
  <form action="/TECHSUPPORT/CellLoad/NightWork/CellLoadNightWork.php?" name="form1" id="form1" method="POST" >
	<label><strong>Switch:
	<select name="Switch" id="Switch" onchange="updateVendor(this.options[this.SelectedIndex].value)">
	  <option value='AAALT'>AAALT</option>
<option value='AALTEST2'>AALTEST2</option>
<option value='Adelphi'>Adelphi</option>

<option value='Albuquerque'>Albuquerque</option>
<option value='Annapolis'>Annapolis</option>
<option value='Austin'>Austin</option>
<option value='Bakersfield'>Bakersfield</option>
<option value='Baltimore'>Baltimore</option>
<option value='Baton Rouge'>Baton Rouge</option>
<option value='Billerica'>Billerica</option>
<option value='Boise'>Boise</option>
<option value='Branchburg 1'>Branchburg 1</option>

<option value='Branchburg 2'>Branchburg 2</option>
<option value='Branchburg 3'>Branchburg 3</option>
<option value='Bridgeville 1'>Bridgeville 1</option>
<option value='Bridgeville 2'>Bridgeville 2</option>
<option value='Buffalo'>Buffalo</option>
<option value='Chantilly'>Chantilly</option>
<option value='Cicero'>Cicero</option>
<option value='Copperfield'>Copperfield</option>
<option value='Covington'>Covington</option>

<option value='Dallas'>Dallas</option>
<option value='Des Moines'>Des Moines</option>
<option value='E. Syracuse'>E. Syracuse</option>
<option value='East Tennessee'>East Tennessee</option>
<option value='El Paso'>El Paso</option>
<option value='Elgin'>Elgin</option>
<option value='Fargo'>Fargo</option>
<option value='Farmingdale 1'>Farmingdale 1</option>
<option value='Farmingdale 2'>Farmingdale 2</option>

<option value='Ft. Worth'>Ft. Worth</option>
<option value='Gilbert'>Gilbert</option>
<option value='Guion Rd 1'>Guion Rd 1</option>
<option value='Guion Rd 2'>Guion Rd 2</option>
<option value='Hickory Hills 2'>Hickory Hills 2</option>
<option value='Hickory Hills 3'>Hickory Hills 3</option>
<option value='Hillsboro'>Hillsboro</option>
<option value='Honolulu'>Honolulu</option>
<option value='Hooksett'>Hooksett</option>

<option value='Jacksonville 2'>Jacksonville 2</option>
<option value='Jersey City 1'>Jersey City 1</option>
<option value='Jersey City 2'>Jersey City 2</option>
<option value='Johnstown'>Johnstown</option>
<option value='Jupiter'>Jupiter</option>
<option value='LA 5E'>LA 5E</option>
<option value='Laight St'>Laight St</option>
<option value='LakeShore'>LakeShore</option>
<option value='Lansing'>Lansing</option>

<option value='Lenexa'>Lenexa</option>
<option value='Lonestar'>Lonestar</option>
<option value='Louisville'>Louisville</option>
<option value='Maple Shade 2'>Maple Shade 2</option>
<option value='Miami 2'>Miami 2</option>
<option value='Middle Tennessee'>Middle Tennessee</option>
<option value='Milwaukee 1'>Milwaukee 1</option>
<option value='Mineloa 2'>Mineloa 2</option>
<option value='Newport News'>Newport News</option>

<option value='North Greenbush 1'>North Greenbush 1</option>
<option value='North Greenbush 2'>North Greenbush 2</option>
<option value='Omaha'>Omaha</option>
<option value='Orlando'>Orlando</option>
<option value='Philadelphia'>Philadelphia</option>
<option value='Phoenix'>Phoenix</option>
<option value='Pittsburgh'>Pittsburgh</option>
<option value='Pleasanton 1'>Pleasanton 1</option>
<option value='Pleasanton 2'>Pleasanton 2</option>

<option value='Plymouth 1'>Plymouth 1</option>
<option value='Plymouth 2'>Plymouth 2</option>
<option value='Portland'>Portland</option>
<option value='Redmond Ridge'>Redmond Ridge</option>
<option value='Richmond'>Richmond</option>
<option value='Roanoke'>Roanoke</option>
<option value='Rochester 2'>Rochester 2</option>
<option value='Rockford'>Rockford</option>
<option value='Salisbury'>Salisbury</option>

<option value='Salt Lake City'>Salt Lake City</option>
<option value='San Francisco'>San Francisco</option>
<option value='Santa Clara'>Santa Clara</option>
<option value='Schertz'>Schertz</option>
<option value='Seattle'>Seattle</option>
<option value='Spokane'>Spokane</option>
<option value='Springfield'>Springfield</option>
<option value='St. Louis 1'>St. Louis 1</option>
<option value='St. Louis 2'>St. Louis 2</option>

<option value='Sunnyvale'>Sunnyvale</option>
<option value='Tacoma'>Tacoma</option>
<option value='Tampa'>Tampa</option>
<option value='Tampa 2'>Tampa 2</option>
<option value='Taunton'>Taunton</option>
<option value='Tempe'>Tempe</option>
<option value='Test 5'>Test 5</option>
<option value='test1'>test1</option>
<option value='Test4'>Test4</option>

<option value='Tucson'>Tucson</option>
<option value='Wallingford 1'>Wallingford 1</option>
<option value='Wallingford 2'>Wallingford 2</option>
<option value='Wayne 1'>Wayne 1</option>
<option value='Wayne 2'>Wayne 2</option>
<option value='West Jordan'>West Jordan</option>
<option value='West NYACK 1'>West NYACK 1</option>
<option value='West NYACK 2'>West NYACK 2</option>
<option value='West Roxbury 1'>West Roxbury 1</option>

<option value='West Roxbury 2'>West Roxbury 2</option>
<option value='West Tennessee'>West Tennessee</option>
<option value='Westborough'>Westborough</option>
<option value='Westpark'>Westpark</option>
<option value='Westside'>Westside</option>
<option value='WhiteStone 1'>WhiteStone 1</option>
<option value='WhiteStone 2'>WhiteStone 2</option>
<option value='Wilmington 1'>Wilmington 1</option>
<option value='Wilmington 2'>Wilmington 2</option>

<option value='Windsor'>Windsor</option>
<option value='Windsor 2'>Windsor 2</option>
<option value='Woodlawn 1'>Woodlawn 1</option>
<option value='Woodlawn 2'>Woodlawn 2</option>
<option value='Aurora 5'>Aurora 5</option>
<option value='Aurora 6'>Aurora 6</option>
<option value='Aurora 7'>Aurora 7</option>
<option value='Bismarck'>Bismarck</option>
<option value='Charleston'>Charleston</option>

<option value='Charlotte 1'>Charlotte 1</option>
<option value='Charlotte 2'>Charlotte 2</option>
<option value='Charlotte 3'>Charlotte 3</option>
<option value='Clinton 1'>Clinton 1</option>
<option value='Clinton 2'>Clinton 2</option>
<option value='Clinton MTX 1'>Clinton MTX 1</option>
<option value='Columbia'>Columbia</option>
<option value='Denver'>Denver</option>
<option value='Denver MTX 2'>Denver MTX 2</option>

<option value='Eugene'>Eugene</option>
<option value='Evansville 1'>Evansville 1</option>
<option value='Evansville 2'>Evansville 2</option>
<option value='Golden Valley'>Golden Valley</option>
<option value='Greensboro'>Greensboro</option>
<option value='Greenville 1'>Greenville 1</option>
<option value='Greenville 2'>Greenville 2</option>
<option value='Greenville 3'>Greenville 3</option>
<option value='Harrisburg'>Harrisburg</option>

<option value='Minnehaha 1'>Minnehaha 1</option>
<option value='Minnehaha 3'>Minnehaha 3</option>
<option value='Peoria'>Peoria</option>
<option value='Pittson'>Pittson</option>
<option value='Raleigh'>Raleigh</option>
<option value='Rock Springs'>Rock Springs</option>
<option value='Rocklin 3'>Rocklin 3</option>
<option value='Rocklin 5'>Rocklin 5</option>
<option value='Rocklin 7'>Rocklin 7</option>

<option value='Sacramento 25'>Sacramento 25</option>
<option value='Sacramento 5'>Sacramento 5</option>
<option value='South Bend'>South Bend</option>
<option value='Stockton'>Stockton</option>
<option value='test3'>test3</option>
<option value='Westminster'>Westminster</option>
<option value='AAANT'>AAANT</option>
<option value='Akron BSM 1'>Akron BSM 1</option>
<option value='Akron BSM 2'>Akron BSM 2</option>

<option value='Akron MTX 1'>Akron MTX 1</option>
<option value='Alpharetta BSM 1'>Alpharetta BSM 1</option>
<option value='Alpharetta BSM 2'>Alpharetta BSM 2</option>
<option value='Alpharetta MTX 1'>Alpharetta MTX 1</option>
<option value='Aurora MTX 3'>Aurora MTX 3</option>
<option value='Azusa'>Azusa</option>
<option value='Bloomington 1'>Bloomington 1</option>
<option value='Bloomington 2'>Bloomington 2</option>
<option value='Carbondale BSM 1'>Carbondale BSM 1</option>

<option value='Carbondale MTX 2'>Carbondale MTX 2</option>
<option value='Charleston BSM 1'>Charleston BSM 1</option>
<option value='Charleston MTX 1'>Charleston MTX 1</option>
<option value='Charlotte MTX 1'>Charlotte MTX 1</option>
<option value='Cincinnati BSM 1'>Cincinnati BSM 1</option>
<option value='Cincinnati BSM 2'>Cincinnati BSM 2</option>
<option value='Cincinnati MTX 1'>Cincinnati MTX 1</option>
<option value='Cleveland BSM 1'>Cleveland BSM 1</option>
<option value='Cleveland BSM 21'>Cleveland BSM 21</option>

<option value='Cleveland BSM 22'>Cleveland BSM 22</option>
<option value='Cleveland MTX 1'>Cleveland MTX 1</option>
<option value='Cleveland MTX 2'>Cleveland MTX 2</option>
<option value='Columbia MTX 1'>Columbia MTX 1</option>
<option value='Columbus BSM 1'>Columbus BSM 1</option>
<option value='Columbus BSM 2'>Columbus BSM 2</option>
<option value='Columbus MTX 1'>Columbus MTX 1</option>
<option value='Detroit BSM 101'>Detroit BSM 101</option>
<option value='Detroit BSM 102'>Detroit BSM 102</option>

<option value='Detroit BSM 111'>Detroit BSM 111</option>
<option value='Detroit BSM 121'>Detroit BSM 121</option>
<option value='Detroit BSM 51'>Detroit BSM 51</option>
<option value='Detroit BSM 52'>Detroit BSM 52</option>
<option value='Detroit BSM 81'>Detroit BSM 81</option>
<option value='Detroit BSM 91'>Detroit BSM 91</option>
<option value='Detroit BSM 92'>Detroit BSM 92</option>
<option value='Detroit MTX 10'>Detroit MTX 10</option>
<option value='Detroit MTX 11'>Detroit MTX 11</option>

<option value='Detroit MTX 12'>Detroit MTX 12</option>
<option value='Detroit MTX 5'>Detroit MTX 5</option>
<option value='Detroit MTX 6'>Detroit MTX 6</option>
<option value='Detroit MTX 8'>Detroit MTX 8</option>
<option value='Detroit MTX 9'>Detroit MTX 9</option>
<option value='Dothan BSM 1'>Dothan BSM 1</option>
<option value='Dothan MTX 1'>Dothan MTX 1</option>
<option value='Eugene MTX 1'>Eugene MTX 1</option>
<option value='Evansville MTX 1'>Evansville MTX 1</option>

<option value='Golden Valley MTX 1'>Golden Valley MTX 1</option>
<option value='Greensboro MTX 1'>Greensboro MTX 1</option>
<option value='Greenville MTX 1'>Greenville MTX 1</option>
<option value='Greenville MTX 7'>Greenville MTX 7</option>
<option value='Harrisburg MTX 1'>Harrisburg MTX 1</option>
<option value='Helena BSM 1'>Helena BSM 1</option>
<option value='Helena MTX 1'>Helena MTX 1</option>
<option value='Inland BSM 13'>Inland BSM 13</option>
<option value='Inland BSM 15'>Inland BSM 15</option>

<option value='Inland BSM 17'>Inland BSM 17</option>
<option value='Inland BSM 19'>Inland BSM 19</option>
<option value='Inland BSM 29'>Inland BSM 29</option>
<option value='Inland BSM 3'>Inland BSM 3</option>
<option value='Inland MTX 44'>Inland MTX 44</option>
<option value='Inland MTX 45'>Inland MTX 45</option>
<option value='Inland MTX 49'>Inland MTX 49</option>
<option value='Las Vegas BSM 1'>Las Vegas BSM 1</option>
<option value='Las Vegas BSM 2'>Las Vegas BSM 2</option>

<option value='Las Vegas MTX 1'>Las Vegas MTX 1</option>
<option value='Lewis Center BSM 1'>Lewis Center BSM 1</option>
<option value='Lewis Center BSM 2'>Lewis Center BSM 2</option>
<option value='Lewis Center MTX 1'>Lewis Center MTX 1</option>
<option value='Lewis Center MTX 2'>Lewis Center MTX 2</option>
<option value='Lonestar MTX 1'>Lonestar MTX 1</option>
<option value='Los Angeles BSM 1'>Los Angeles BSM 1</option>
<option value='Los Angeles BSM 11'>Los Angeles BSM 11</option>
<option value='Los Angeles BSM 3'>Los Angeles BSM 3</option>

<option value='Los Angeles BSM 9'>Los Angeles BSM 9</option>
<option value='Los Angeles MTX 41'>Los Angeles MTX 41</option>
<option value='Los Angeles MTX 43'>Los Angeles MTX 43</option>
<option value='Macon BSM 1'>Macon BSM 1</option>
<option value='Macon BSM 5'>Macon BSM 5</option>
<option value='Macon MTX 1'>Macon MTX 1</option>
<option value='Marina BSM 21'>Marina BSM 21</option>
<option value='Marina BSM 23'>Marina BSM 23</option>
<option value='Marina BSM 5'>Marina BSM 5</option>

<option value='Marina BSM 7'>Marina BSM 7</option>
<option value='Marina MTX 32'>Marina MTX 32</option>
<option value='Marina MTX 42'>Marina MTX 42</option>
<option value='Marina MTX 46'>Marina MTX 46</option>
<option value='Minnehaha MTX 1'>Minnehaha MTX 1</option>
<option value='Peoria MTX 1'>Peoria MTX 1</option>
<option value='Pittson MTX 1'>Pittson MTX 1</option>
<option value='Raleigh BSM 1'>Raleigh BSM 1</option>
<option value='Raleigh MTX 1'>Raleigh MTX 1</option>

<option value='Rocklin MTX 1'>Rocklin MTX 1</option>
<option value='San Diego BSM 1'>San Diego BSM 1</option>
<option value='San Diego BSM 3'>San Diego BSM 3</option>
<option value='San Diego BSM 5'>San Diego BSM 5</option>
<option value='San Diego MTX 48'>San Diego MTX 48</option>
<option value='San Diego MTX 50'>San Diego MTX 50</option>
<option value='Santa Anna BSM 2'>Santa Anna BSM 2</option>
<option value='Santa Anna BSM 4'>Santa Anna BSM 4</option>
<option value='Santa Anna BSM 6'>Santa Anna BSM 6</option>

<option value='Santa Anna BSM 8'>Santa Anna BSM 8</option>
<option value='Santa Anna MTX 31'>Santa Anna MTX 31</option>
<option value='Santa Anna MTX 51'>Santa Anna MTX 51</option>
<option value='Santa Anna MTX 52'>Santa Anna MTX 52</option>
<option value='Sioux Falls BSM 1'>Sioux Falls BSM 1</option>
<option value='Sioux Falls BSM 2'>Sioux Falls BSM 2</option>
<option value='Sioux Falls MTX 2'>Sioux Falls MTX 2</option>
<option value='South Bend MTX 1'>South Bend MTX 1</option>
<option value='Stockton MTX 1'>Stockton MTX 1</option>

<option value='Sugarloaf BSM 13'>Sugarloaf BSM 13</option>
<option value='Sugarloaf BSM 17'>Sugarloaf BSM 17</option>
<option value='Sugarloaf BSM 9'>Sugarloaf BSM 9</option>
<option value='Sugarloaf MTX 3'>Sugarloaf MTX 3</option>
<option value='Sugarloaf MTX 4'>Sugarloaf MTX 4</option>
<option value='test2'>test2</option>
<option value='Tustin BSM 25'>Tustin BSM 25</option>
<option value='Tustin BSM 27'>Tustin BSM 27</option>
<option value='Tustin MTX 47'>Tustin MTX 47</option>

	</select>
	</strong></label>
	<strong>
	<label>Person:
	<select name="Person" id="Person">
	  <option value='Larry Knight'>Larry Knight</option>
<option value='Christopher Shallcross'>Christopher Shallcross</option>
<option value='Paula Salisbury'>Paula Salisbury</option>
<option value='Ken Spatz'>Ken Spatz</option>

<option value='Operation Support Services'>Operation Support Services</option>
<option value='Switch'>Switch</option>
	</select>
	</label>
	</strong>
	<label>Vendor
   <input name="Vendor" type="text" id="Vendor" />
	</label>
<p><strong>
	  <label>Version
	  <input type="text" name="Version" id="Version" />

	  </label>
	  </strong></p>
	<p><strong>Date Completed: 
	
	 <input type="text" name="DATE" size="10" maxlength="10" value="" />
	 <a href="java script:void(0)" onclick="showCalendar(form1.DATE, 'yyyy-MM-DD', 'Choose Start Date')">
	 <img src="/Javascripts/CAL-icon.gif" width="16" height="16" alt="Click here to choose date" /></a>  
	</strong></p>
   <p><strong>
	  <label>Digital
	  <input name="Digital" type="text" id="Digital" onkeyup="cellcount(this.value)" />

	  </label>
	  <label>Total
	  <script type="text/javascript">
	  var cnt;
	  function cellcount(count)
	  {
		  var words = count.split(/\,/);
		cnt = words.length;
		var ele= document.getElementById('Total1');
		ele.value = cnt;
	  }
	  document.write("<input name=Total1 type=text id=Total1 size=4 >");
	  </script>
	  </label>
	  
	</strong></p>
	<p><strong>
	  <label>Evdo
	  <input type="text" name="EVDO" id="EVDO" onkeyup="evdocount(this.value)" />
	  </label>

	 
	  <label>Total
	   <script type="text/javascript">
	  var cnt;
	  function evdocount(count)
	  {
		  var words = count.split(/\,/);
		cnt = words.length;
		var ele= document.getElementById('Total2');
		ele.value = cnt;
	  }
	  document.write("<input name=Total2 type=text id=Total2 size=4 >");
	  </script>
	   </label>
		</strong></p>
	<p>
	  <strong>
	  <label>Comments</label>
	  </strong>

	  <label><br />
	  <textarea name="Comments" id="Comments" cols="80" rows="5"></textarea>
	  </label>
	</p>
	<p>
	  <label>
	  <input type="submit" name="button" id="button" value="Submit" />
	  </label>

	</p>
	
	<input name="hiddenField" type="hidden" id="hiddenField" value="" />
	<input type="hidden" name="MM_insert" value="form1" />
  </form>
  <p></p>
</div>
</body>
</head>
</html>
</html>



So know that i have the array working why will the function not work.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1