troubleshooting Question

Object Expected error

Avatar of Awake_in_naptown
Awake_in_naptown asked on
JavaScriptHTML
7 Comments2 Solutions339 ViewsLast Modified:
I'm getting an Object Expected error on line 220 in my code and I can't figure out why... Am I doing my button wrong somehow?
<!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" xml:lang="en" lang="en">
<head>
  <title>White Glove Preday Check Email Generator</title>
 
 <script language="javascript" type="text/javascript">
 
 Function asia() {
 
  if (document.Backups.value == "Green")
 	{alert ("Yo!")}
	;
	
 }
 </script>
 
</head>
<body>
<center><b>White Glove Preday Check Email Generator</b></Center>
<br><p>
<table border="1">
  <tr><!-- Row 1 -->
     <td>Antrim/Zavacor</td><!-- Col 1 -->
     <td><select name="Ant_Zav" onChange="document.getElementById('Ant_Zav_Explain').style.display=this.options[this.selectedIndex].value!='Green'?'':'none'">
				  <option selected value="Green">Green</option>
				  <option value="Green*">Green*</option>
				  <option value="Yellow">Yellow</option>
				  <option value="Yellow*">Yellow*</option>
				  <option value="Red">Red</option>
				  <option value="Red*">Red*</option>
				  </select>
		<div id="Ant_Zav_Explain" style="display: none">
		Explanation: <input type="textbox" name="Ant_Zav_Explained" size="32"/>
		</div>
	</td><!-- Col 2 -->
  </tr>
  <tr><!-- Row 2 -->
     <td>Backups</td><!-- Col 1 -->
     <td><select name="Backups" onChange="document.getElementById('Backups_Explain').style.display=this.options[this.selectedIndex].value!='Green'?'':'none'">
				  <option selected value="Green">Green</option>
				  <option value="Green*">Green*</option>
				  <option value="Yellow">Yellow</option>
				  <option value="Yellow*">Yellow*</option>
				  <option value="Red">Red</option>
				  <option value="Red*">Red*</option>
				  </select>
		<div id="Backups_Explain" style="display: none">
		Explanation: <input type="textbox" name="Backups_Explained" size="32"/>
		</div></td><!-- Col 2 -->
  </tr>
  <tr><!-- Row 3 -->
     <td>Data Extract/Loader</td><!-- Col 1 -->
     <td><select name="DEL" onChange="document.getElementById('DEL_Explain').style.display=this.options[this.selectedIndex].value!='Green'?'':'none'">
				  <option selected value="Green">Green</option>
				  <option value="Green*">Green*</option>
				  <option value="Yellow">Yellow</option>
				  <option value="Yellow*">Yellow*</option>
				  <option value="Red">Red</option>
				  <option value="Red*">Red*</option>
				  </select>
		<div id="DEL_Explain" style="display: none">
		Explanation: <input type="textbox" name="DEL_Explained" size="32"/>
		</div></td><!-- Col 2 -->
  </tr>
  <tr><!-- Row 4 -->
     <td>Data Transfer</td><!-- Col 1 -->
     <td><select name="DT4" onChange="document.getElementById('DT4_Explain').style.display=this.options[this.selectedIndex].value!='Green'?'':'none'">
				  <option selected value="Green">Green</option>
				  <option value="Green*">Green*</option>
				  <option value="Yellow">Yellow</option>
				  <option value="Yellow*">Yellow*</option>
				  <option value="Red">Red</option>
				  <option value="Red*">Red*</option>
				  </select>
		<div id="DT4_Explain" style="display: none">
		Explanation: <input type="textbox" name="DT4_Explained" size="32"/>
		</div></td><!-- Col 2 -->
  </tr>
  <tr><!-- Row 5 -->
     <td>Database - DSM</td><!-- Col 1 -->
     <td><select name="DSM" onChange="document.getElementById('DSM_Explain').style.display=this.options[this.selectedIndex].value!='Green'?'':'none'">
				  <option selected value="Green">Green</option>
				  <option value="Green*">Green*</option>
				  <option value="Yellow">Yellow</option>
				  <option value="Yellow*">Yellow*</option>
				  <option value="Red">Red</option>
				  <option value="Red*">Red*</option>
				  </select>
		<div id="DSM_Explain" style="display: none">
		Explanation: <input type="textbox" name="DSM_Explained" size="32"/>
		</div></td><!-- Col 2 -->
  </tr>
  <tr><!-- Row 6 -->
     <td>Database - Informix</td><!-- Col 1 -->
     <td><select name="INF" onChange="document.getElementById('INF_Explain').style.display=this.options[this.selectedIndex].value!='Green'?'':'none'">
				  <option selected value="Green">Green</option>
				  <option value="Green*">Green*</option>
				  <option value="Yellow">Yellow</option>
				  <option value="Yellow*">Yellow*</option>
				  <option value="Red">Red</option>
				  <option value="Red*">Red*</option>
				  </select>
		<div id="INF_Explain" style="display: none">
		Explanation: <input type="textbox" name="INF_Explained" size="32"/>
		</div></td><!-- Col 2 -->
  </tr>
  <tr><!-- Row 7 -->
     <td>Database - Oracle</td><!-- Col 1 -->
     <td><select name="ORA" onChange="document.getElementById('ORA_Explain').style.display=this.options[this.selectedIndex].value!='Green'?'':'none'">
				  <option selected value="Green">Green</option>
				  <option value="Green*">Green*</option>
				  <option value="Yellow">Yellow</option>
				  <option value="Yellow*">Yellow*</option>
				  <option value="Red">Red</option>
				  <option value="Red*">Red*</option>
				  </select>
		<div id="ORA_Explain" style="display: none">
		Explanation: <input type="textbox" name="ORA_Explained" size="32"/>
		</div></td><!-- Col 2 -->
  </tr>
  <tr><!-- Row 8 -->
     <td>FLR/Exacta</td><!-- Col 1 -->
     <td><select name="FLR" onChange="document.getElementById('FLR_Explain').style.display=this.options[this.selectedIndex].value!='Green'?'':'none'">
				  <option selected value="Green">Green</option>
				  <option value="Green*">Green*</option>
				  <option value="Yellow">Yellow</option>
				  <option value="Yellow*">Yellow*</option>
				  <option value="Red">Red</option>
				  <option value="Red*">Red*</option>
				  </select>
		<div id="FLR_Explain" style="display: none">
		Explanation: <input type="textbox" name="FLR_Explained" size="32"/>
		</div></td><!-- Col 2 -->
  </tr>
  <tr><!-- Row 9 -->
     <td>LabLink</td><!-- Col 1 -->
     <td><select name="LAB" onChange="document.getElementById('LAB_Explain').style.display=this.options[this.selectedIndex].value!='Green'?'':'none'">
				  <option selected value="Green">Green</option>
				  <option value="Green*">Green*</option>
				  <option value="Yellow">Yellow</option>
				  <option value="Yellow*">Yellow*</option>
				  <option value="Red">Red</option>
				  <option value="Red*">Red*</option>
				  </select>
		<div id="LAB_Explain" style="display: none">
		Explanation: <input type="textbox" name="LAB_Explained" size="32"/>
		</div></td><!-- Col 2 -->
  </tr>
  <tr><!-- Row 10 -->
     <td>Network</td><!-- Col 1 -->
     <td><select name="NET" onChange="document.getElementById('NET_Explain').style.display=this.options[this.selectedIndex].value!='Green'?'':'none'">
				  <option selected value="Green">Green</option>
				  <option value="Green*">Green*</option>
				  <option value="Yellow">Yellow</option>
				  <option value="Yellow*">Yellow*</option>
				  <option value="Red">Red</option>
				  <option value="Red*">Red*</option>
				  </select>
		<div id="NET_Explain" style="display: none">
		Explanation: <input type="textbox" name="NET_Explained" size="32"/>
		</div></td><!-- Col 2 -->
  </tr>
  <tr><!-- Row 11 -->
     <td>QBS</td><!-- Col 1 -->
     <td><select name="QBS" onChange="document.getElementById('QBS_Explain').style.display=this.options[this.selectedIndex].value!='Green'?'':'none'">
				  <option selected value="Green">Green</option>
				  <option value="Green*">Green*</option>
				  <option value="Yellow">Yellow</option>
				  <option value="Yellow*">Yellow*</option>
				  <option value="Red">Red</option>
				  <option value="Red*">Red*</option>
				  </select>
		<div id="QBS_Explain" style="display: none">
		Explanation: <input type="textbox" name="QBS_Explained" size="32"/>
		</div></td><!-- Col 2 -->
  </tr>
  <tr><!-- Row 12 -->
     <td>Server - INTEL</td><!-- Col 1 -->
     <td><select name="INTEL" onChange="document.getElementById('INTEL_Explain').style.display=this.options[this.selectedIndex].value!='Green'?'':'none'">
				  <option selected value="Green">Green</option>
				  <option value="Green*">Green*</option>
				  <option value="Yellow">Yellow</option>
				  <option value="Yellow*">Yellow*</option>
				  <option value="Red">Red</option>
				  <option value="Red*">Red*</option>
				  </select>
		<div id="INTEL_Explain" style="display: none">
		Explanation: <input type="textbox" name="INTEL_Explained" size="32"/>
		</div></td><!-- Col 2 -->
  </tr>
  <tr><!-- Row 13 -->
     <td>Unix Servers</td><!-- Col 1 -->
     <td><select name="UNI" onChange="document.getElementById('UNI_Explain').style.display=this.options[this.selectedIndex].value!='Green'?'':'none'">
				  <option selected value="Green">Green</option>
				  <option value="Green*">Green*</option>
				  <option value="Yellow">Yellow</option>
				  <option value="Yellow*">Yellow*</option>
				  <option value="Red">Red</option>
				  <option value="Red*">Red*</option>
				  </select>
		<div id="UNI_Explain" style="display: none">
		Explanation: <input type="textbox" name="UNI_Explained" size="32"/>
		</div></td><!-- Col 2 -->
  </tr>
  <tr><!-- Row 14 -->
     <td>Storage</td><!-- Col 1 -->
     <td><select name="STO" onChange="document.getElementById('STO_Explain').style.display=this.options[this.selectedIndex].value!='Green'?'':'none'">
				  <option selected value="Green">Green</option>
				  <option value="Green*">Green*</option>
				  <option value="Yellow">Yellow</option>
				  <option value="Yellow*">Yellow*</option>
				  <option value="Red">Red</option>
				  <option value="Red*">Red*</option>
				  </select>
		<div id="STO_Explain" style="display: none">
		Explanation: <input type="textbox" name="STO_Explained" size="32"/>
		</div></td><!-- Col 2 -->
  </tr>
</table>
<input type="button" value="press me" onClick="javascript:asia()"/>
</body>
</html>
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 7 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros