Advertisement

08.27.2008 at 02:42PM PDT, ID: 23683709
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.3

Need help with constructing an innerHTML reference

Asked by saabStory in JavaScript

I'm making an interface based on an image map.  When you mouseover one of the countries or click on one of the column heads, you see a list of countries drop down.  As it sits right now, the heading of the dropped column remains a link.  What I want to do is to re-write the inner HTML of the div to not be a link for the selected column/country.  I'm having trouble writing the reference though.  I thought I could take the div id from the array I was polling, add a one (1) to the end of it to refer to the div I'd like to change but I keep getting a syntax error.

If anyone could tell me what I'm doing wrong and how to fix it, I'd greatly appreciate it.

Thanks much in advance.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
<html>
<head>
	<title>Untitled</title>
	<style type="text/css" media="all">
	
	a {color:#00338e;outline:none;}
	a:link {color:#00338e;}
	a:visited {color:#00338e;}
	a:hover {color:#47a;text-decoration:underline;}
	a:active {color:#00338e;}
	ul {margin:5px 0 10px 1px;list-style-type:none;font:8pt/12pt verdana,arial,sans-serif;padding:0;}
	
	#searchPageHead {font:10pt/13pt verdana,arial,sans-serif;font-weight:bold;color#444;}
	#oppContent{background-color:#eee;width:565px;padding:0 21px 20px 21px;}
	.continent {font:9pt/12pt verdana,arial,sans-serif;font-weight:bold;padding-right:20px;}
	.divider {padding:0;margin:10px 0;color:#999;height:1px;}
	.noRight {padding-right:0;margin-right:0;}
	.continentAus {padding-right:10px;}
	.otherOpps {font:9pt/12pt arial,sans-serif;margin:5px 0px 0 10px;}
 
	/*- Continent Areas -*/
		#list li {background:url("http://www.43rdworld.com/images/bullet.gif") no-repeat top left;padding-left:10px;}
		#europe {margin-left:127px;}
		#africa {margin-left:203px;}
		#asia {margin-left:260px;}
		#australia {margin-left:320px;}
	</style>
	<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
  <!--
var divArray = new Array();
	divArray.push("northAmerica");
	divArray.push("europe");
	divArray.push("asia");
	divArray.push("australia");
	divArray.push("africa");
 
 
function turnOffAllDivs()
{
	 for (var i in divArray)
	 {
	 	var el = document.getElementById(divArray[i]);
		el.style.display = "none";
	 }
}
 
 
function showEl(id)
{
 
	turnOffAllDivs();
	var el = document.getElementById(id);
	el.style.display = "";
}
 
  //-->
  </SCRIPT>
</head>
 
<body>
 
 
<div id="oppContent">
<table cellpadding="0" cellspacing="0" width="522"">
<tr><td colspan="3" id="searchPageHead">Text text text text?</td></tr>
<tr>
	<td width="390" valign="top" style="padding:12px 0 0 5px;"><IMG SRC="http://www.43rdworld.com/images/mainMap.gif" USEMAP="#mainMap.gif" WIDTH="338" HEIGHT="156" border="0"></td>
	<td width="130" valign="top">
	</td>
</tr>
<tr><td colspan="2"><hr class="divider" width="100%" size="1"></td></tr>
<tr>
	<td>
		<table cellpadding="0" cellspacing="0" width="390"">
			<tr>
				<td class="continent" width="32%"><div id="northamerica1"><a href="#" onClick="showEl('northAmerica');return false;">North America</a></div></td>
				<td class="continent" width="18%"><div id="europe1"><a href="#" onClick="showEl('europe');return false;">Europe</a></div></td>
				<td class="continent" width="15%"><div id="africa1"><a href="#" onClick="showEl('africa');return false;">Africa</a></div></td>
				<td class="continent" width="15%"><div id="asia1"><a href="#" onClick="showEl('asia');return false;">Asia</a></div></td>
				<td class="continent continentAus" width="17%"><div id="australia1"><a href="#" onClick="showEl('australia');return false;">Australia</a></div></td>
			</tr>
			<tr>
				<td colspan="5">
					<div id="northAmerica" style="display:none;">
						<ul id="list">
							<li>Canada</li>
							<li> Mexico</li>
							<li> United States</li>
						</ul>
					</div>
					<div id="europe" style="display:none;">
						<ul id="list">
							<li>Belgium</li>
							<li>Ireland</li>
							<li>Italy</li>
							<li>The Netherlands</li>
							<li>United Kingdom</li>
							<li>Other Europe</li>
						</ul>
					</div>
					<div id="africa" style="display:none;">
						<ul id="list">
							<li>South Africa</li>
						</ul>
					</div>
					<div id="asia" style="display:none;">
						<ul id="list">
							<li>Asia</li>
							<li>Middle East</li>
						</ul>
					</div>
					<div id="australia" style="display:none;">
						<ul id="list">
							<li>Australia</li>
						</ul>
					</div>
				</td>
			</tr>
		</table>
	</td>
	<td></td>
</tr>
</table>
</div>
<MAP NAME="mainMap.gif">
<AREA SHAPE=POLY COORDS="9,5,70,5,69,11,61,18,63,19,65,19,70,25,70,14,72,12,75,14,79,14,82,18,84,16,96,28,96,28,92,28,88,30,88,31,90,33,92,34,90,36,87,38,84,38,84,39,80,40,79,47,74,50,75,60,72,60,70,59,70,53,66,53,59,55,58,63,61,65,63,65,63,62,69,62,69,67,68,69,71,69,73,70,73,76,77,76,79,77,76,81,71,81,66,74,62,74,60,71,55,71,53,69,50,68,47,66,47,63,43,63,42,60,36,54,36,50,32,46,30,41,14,65,5,59,5,56,30,40,31,28,22,19,12,19,5,25,0,25,4,20,2,20,0,16,7,7,9,5" OnMouseOver="showEl('northAmerica');return false;">
<AREA SHAPE=POLY COORDS="155,10,153,8,144,8,144,15,152,23,150,25,150,28,153,28,155,34,150,34,148,36,148,44,150,46,155,46,160,43,168,43,172,47,175,43,182,49,185,49,185,46,182,44,182,41,183,41,183,36,190,33,193,36,197,36,198,37,199,37,199,33,198,33,198,29,206,29,205,18,205,12,208,8,207,7,195,7,194,6,188,6,187,4,180,4,175,6,169,12,167,12,165,15,165,20,167,22,166,23,163,23,161,21,161,18,159,16,156,16" OnMouseOver="showEl('europe');return false;">
<AREA SHAPE=POLY COORDS="168,43,159,43,156,46,149,46,147,49,147,52,144,54,138,60,138,75,147,86,150,86,151,85,156,85,158,82,161,85,164,85,164,92,169,97,169,102,167,104,167,114,171,117,171,124,172,125,172,129,175,132,179,132,180,131,184,131,190,125,190,122,193,120,193,113,198,116,198,121,202,124,202,124,206,121,206,114,208,111,208,102,204,102,200,108,198,107,198,91,208,82,208,79,210,77,210,74,208,73,206,73,205,75,201,75,198,71,198,68,194,65,194,61,191,57,190,55,191,51,190,50,183,50,183,49,180,48,175,48,175,51,174,51,174,49,171,48,168,43" OnMouseOver="showEl('africa');return false;">
<AREA SHAPE=POLY COORDS="207,7,208,8,205,12,206,29,198,29,198,33,199,33,199,37,198,37,197,36,193,36,190,33,183,36,183,41,183,41,185,45,187,46,189,48,191,48,191,51,191,51,190,55,195,62,195,65,199,69,199,71,201,74,205,74,207,72,210,72,215,67,215,65,218,62,218,60,216,58,222,58,227,65,228,65,231,76,232,76,232,80,237,83,239,83,241,80,241,79,239,76,239,71,245,64,247,64,250,67,249,70,249,70,249,71,254,71,254,81,250,81,261,97,261,100,270,101,296,100,298,102,304,102,309,103,311,103,312,95,312,92,303,92,302,91,299,91,297,89,294,89,290,86,286,86,286,77,282,71,281,66,287,52,294,47,295,37,295,30,300,30,300,21,298,18,303,18,304,16,308,16,308,13,299,4,274,4,274,3,258,3,256,2,246,2,244,0,227,0,219,2,214,2,208,4" OnMouseOver="showEl('asia');return false;">
<AREA SHAPE=POLY COORDS="302,102,298,102,289,102,285,105,281,105,278,109,278,112,274,112,270,116,270,119,271,124,273,125,273,127,272,128,272,132,276,136,280,132,285,132,287,129,291,129,300,136,302,139,302,143,304,144,307,143,320,148,328,148,337,135,336,131,330,132,313,128,313,117,306,110,306,107,303,104,303,102" OnMouseOver="showEl('australia');return false;">
</MAP>
 
</body>
</html>
 
Loading Advertisement...
 
[+][-]08.27.2008 at 04:30PM PDT, ID: 22330229

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.27.2008 at 10:43PM PDT, ID: 22331897

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.28.2008 at 07:10AM PDT, ID: 22335018

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.28.2008 at 07:15AM PDT, ID: 22335084

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.28.2008 at 07:40AM PDT, ID: 22335411

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.28.2008 at 07:48AM PDT, ID: 22335512

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.28.2008 at 07:48AM PDT, ID: 22335516

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.28.2008 at 08:02AM PDT, ID: 22335706

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.28.2008 at 08:09AM PDT, ID: 22335803

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.28.2008 at 08:26AM PDT, ID: 22336024

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.28.2008 at 11:17AM PDT, ID: 22337988

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: JavaScript
Sign Up Now!
Solution Provided By: Badotz
Participating Experts: 2
Solution Grade: A
 
 
[+][-]08.28.2008 at 12:26PM PDT, ID: 22338794

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628