[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[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!

9.1

JavaScript Help needed for survey

Asked by AJJR in JScript, Hypertext Markup Language (HTML)

Tags: JavaScript, HTML input, JS Functions

Hello Experts,
I am in need of some help just looking over my scripts for obvious errors. I can't seen to find why I am not getting the results I am after, but then again I am not a JavaScript guru and have only dabbled in it. I am sure you pro's can see what I did wrong quickly. The premise is this used to be a form in coldfusion that I am migrating to an asp.net site. I thought since it is a useless survey (i.e. results aren't saved or processed) that there is no need to make an HTML form out of it but instead use some JS to give the same effect but be a hell of a lot faster! I know I could have done some things different including using a loop for the answer functions...if you want to show me some light, I would be more then happy to see it.
Thanks in advance experts!
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:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
<!-- HTML CODE START FILENAME HomePuzzle.htm -->
<!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 language="JavaScript">
var currentLayer = 'QuestionPane1';
function showLayer(lyr){
	hideLayer(currentLayer);
	document.getElementById(lyr).style.visibility = 'visible';
	currentLayer = lyr;
}
 
function hideLayer(lyr){
	document.getElementById(lyr).style.visibility = 'hidden';
}
var q1=0;
var q2=0;
var q3=0;
var q4=0;
var q5=0;
var q6=0;
function returnScore(){
var tally;
var score;
tally=q1 + q2 + q3 + q4 + q5 + q6;
score=tally/6*100;
document.write(Math.round(score) + '%')
}
function q1Answer(){
if (q1=0) {document.write(q1='No');}
else if (q1=1) {document.write(q1='Yes');}
}
function q2Answer(){
if (q2=0) {document.write(q2='No');}
else if (q2=1) {document.write(q2='Yes');}
}
function q3Answer(){
if (q3=0) {document.write(q3='No');}
else if (q3=1) {document.write(q3='Yes');}
}
function q4Answer(){
if (q4=0) {document.write(q4='No');}
else if (q4=1) {document.write(q4='Yes');}
}
function q5Answer(){
if (q5=0) {document.write(q5='No');}
else if (q5=1) {document.write(q5='Yes');}
}
function q6Answer(){
if (q6=0) {document.write(q6='No');}
else if (q6=1) {document.write(q6='Yes');}
}
</script>
<style>
.QuestionPane{
	height:400px;
	position: absolute;
	top: 0;
	left: 100;
	visibility: hidden;
}
body{
	height:400px;
}
</style>
<link href="/puzzle/mainstyle.css" rel="stylesheet" type="text/css" />
</head>
 
<body height="400">
<div id="outerwrap">
	<div id="QuestionPane1" class="QuestionPane" style="visibility:visible;" >
		<div class="puzzle_1">
			<img src="/Puzzle/puzzle_1.png" alt="" width="484" height="390" class="puzzle_knockout" />
		</div>
		<div class="question">
			<div valign="bottom" class="question_mark4"></div>
			<div class="question_txt">Do you have an<br/>active and up<br/>to date Sales<br/>program using<br/>a Sales pipeline<br/>with accountability?</div>
			<div class="yes_no">
				<div class="yes"><input class="yes_no_btn" type="button" value="Yes" name="q1" onClick="q1=1;" onMouseUp="showLayer('QuestionPane2');" /></div>
				<div class="no"><input class="yes_no_btn" type="button" value="No" name="q1" onMouseUp="showLayer('QuestionPane2');" /></div>
			</div>
		</div>
	</div>
	<div id="QuestionPane2" class="QuestionPane">
	  <div class="puzzle_1">
			<img src="/Puzzle/puzzle_2.png" alt="" width="484" height="390" class="puzzle_knockout" />
		</div>
		<div class="question">
			<div valign="bottom" class="question_mark4"></div>
			<div class="question_txt">Do you have an active and up to<br/>date integrated Marketing<br />Program with measurable performance?</div>
			<div class="yes_no">
				<div class="yes"><input class="yes_no_btn" type="button" value="Yes" name="q2" onClick="q2=1;" onMouseUp="showLayer('QuestionPane3');" /></div>
				<div class="no"><input  class="yes_no_btn" type="button" value="No" name="q2" onMouseUp="showLayer('QuestionPane3');" /></div>
			</div>
		</div>
	</div>
	<div id="QuestionPane3" class="QuestionPane">
	  <div class="puzzle_1">
			<img src="/Puzzle/puzzle_3.png" alt="" width="484" height="390" class="puzzle_knockout" />
		</div>
		<div class="question">
			<div valign="bottom" class="question_mark5"></div>
			<div class="question_txt">Can you effectively develop,<br />implement and maintain your<br />own sales & marketing programs?</div>
			<div class="yes_no">
				<div class="yes"><input class="yes_no_btn" type="button" value="Yes" name="q3" onClick="q3=1;" onMouseUp="showLayer('QuestionPane4');" /></div>
				<div class="no"><input  class="yes_no_btn" type="button" value="No" name="q3" onMouseUp="showLayer('QuestionPane4');" /></div>
			</div>
		</div>
	</div>
	<div id="QuestionPane4" class="QuestionPane">
	  <div class="puzzle_1">
			<img src="/Puzzle/puzzle_4.png" alt="" width="484" height="390" class="puzzle_knockout" />
		</div>
		<div class="question">
			<div valign="bottom" class="question_mark4"></div>
			<div class="question_txt">Does your<br />organization<br />have a current<br />and active<br />Strategic Plan in<br />place?</div>
			<div class="yes_no">
				<div class="yes"><input class="yes_no_btn" type="button" value="Yes" name="q4" onClick="q4=1;" onMouseUp="showLayer('QuestionPane5');" /></div>
				<div class="no"><input class="yes_no_btn" type="button" value="No" name="q4" onMouseUp="showLayer('QuestionPane5');" /></div>
			</div>
		</div>
	</div>
	<div id="QuestionPane5" class="QuestionPane">
	  <div class="puzzle_1">
			<img src="/Puzzle/puzzle_5.png" alt="" width="484" height="390" class="puzzle_knockout" />
		</div>
		<div class="question">
			<div valign="bottom" class="question_mark4"></div>
			<div class="question_txt">Do you have a streamlined integrated<br />system and<br />database going<br />from sales to delivery and support?</div>
			<div class="yes_no">
				<div class="yes"><input class="yes_no_btn" type="button" value="Yes" name="q5" onClick="q5=1;" onMouseUp="showLayer('QuestionPane6');" /></div>
				<div class="no"><input class="yes_no_btn" type="button" value="No" name="q5" onMouseUp="showLayer('QuestionPane6');" /></div>
			</div>
		</div>
	</div>
	<div id="QuestionPane6" class="QuestionPane">
	  <div class="puzzle_1">
			<img src="/Puzzle/puzzle_6.png" alt="" width="484" height="390" class="puzzle_knockout" />
		</div>
		<div class="question">
			<div valign="bottom" class="question_mark4"></div>
			<div class="question_txt">Are you<br />currently the<br />market leader?</div>
			<div class="yes_no">
				<div class="yes"><input class="yes_no_btn" type="button" value="Yes" name="q6" onClick="q6=1;" onMouseUp="showLayer('ResultsPane')" /></div>
				<div class="no"><input class="yes_no_btn" type="button" value="No" name="q6" onMouseUp="showLayer('ResultsPane')" /></div>
			</div>
		</div>
	</div>
	<div id="ResultsPane" class="QuestionPane" height="100%">
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<tbody>
				<tr>
					<td><div class="puzzle_3"><img src="/Puzzle/puzzle_9.png" alt="Results driven sales come from Marketing Development, Sales Development and Business Development" width="485" height="390" class="puzzle_knockout" /></div></td>
					<td>
						<table width="100%" border="0" cellpadding="0" cellspacing="5">
							<tbody>
								<tr>
									<td>
										<div class="last_question">
											<div class="question_mark2"></div>
											Are you ready<br />to take action?<br /><br />
											<div class="consult" style="font-size:26px">For your Free Consult <a href="/contact/default.aspx">click here</a></div>
										</div>
									</td>
								</tr>
							</tbody>
						</table>
					</td>
				</tr>
			</tbody>
		</table>
		<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" valign="top">
			<tbody>
				<tr>
					<td colspan="2" align="left"><div class="results_title">Questionnaire Results</div></td>
				</tr>
				<tr>
					<td colspan="2" align="left"><div class="question_score">Sales Success Quotient: <span class="score_color"><script type="text/javascript">returnScore()</script></span></div></td>
				</tr>
				<tr>
					<td valign="top">
						<div class="list_left">
							<ol style="margin-bottom: 0">
								<li>Do you have an active and up to date Sales program using a Sales pipeline with accountability? &raquo;
									<div id="q1" class="answer" >Without a pipeline a company has no way to gauge results and/or promote success.  This leads to poor morale and lack of direction.</div>
									<div class="red_text"><strong>Answered:</strong><script type="text/javascript">q1Answer()</script></div>
								</li>
								<li>Do you have an active and up to date integrated Marketing Program with measurable performance? &raquo;
									<div id="q2" class="answer" >With no way to measure performance there is no way to gauge the effectiveness of your investment. If your program is not up to date, your company and its services may be falling badly behind.</div>
									<div class="red_text"><strong>Answered:</strong><script type="text/javascript">q2Answer()</script></div>
								</li>
								<li>Can you effectively develop, implement and maintain your own sales & marketing programs? &raquo;
									<div id="q3" class="answer" >Without fulltime involvement there is little or no direction with respect to sales and marketing inside the company.  Objectives are often unclear and not understood.  Sales growth is either non-existent or is poor.  Recognition of the company itself or the company's products or services in the market also suffers.</div>
									<div class="red_text"><strong>Answered:</strong><script type="text/javascript">q3Answer()</script></div>
								</li>
							</ol>
						</div>
					</td>
					<td valign="top">
						<div class="list_right">
							<ol start="4" style="margin-bottom: 0">
								<li>Does your organization have a current and active Strategic Plan in place? &raquo;
									<div id="q4" class="answer" >Without a current and active strategic plan, an organization can rapidly become stale and out of touch with its market, competition, and growth opportunities. This leads to less profit, less enthusiasm, and less teamwork within the organization. New ideas and concepts come from the creative energy produced by an organization. It all starts with an energetic and comprehensive <em>Breakthrough Strategic Planning Process</em>.</div>
									<div class="red_text"><strong>Answered:</strong><script type="text/javascript">q4Answer()</script></div>
								</li>
								<li>Do you have a streamlined integrated system and database going from sales to delivery and support? &raquo;
									<div id="q5" class="answer" >Without a compete process; inside sales, outside sales, customer service, delivery and support cannot know how best to support and develop customers.  This leads to high attrition rates and will erode your customer base very rapidly.</div>
									<div class="red_text"><strong>Answered:</strong><script type="text/javascript">q5Answer()</script></div>
								</li>
								<li>Are you currently the market leader? &raquo;
									<div id="q6" class="answer" >A market leader has the opportunity to set prices and set the agenda for their market - do you?</div>
									<div class="red_text"><strong>Answered:</strong><script type="text/javascript">q6Answer()</script></div>
								</li>
							</ol>
						</div>
					</td>
				</tr>
			</tbody>
		</table>
	</div>
</div>
</body>
</html>
<!-- HTML CODE END -->
 
 
 
<!-- CSS CODE START FILENAME MainStyle.css -->
.QuestionPane{
	height:400px;
	position: absolute;
	top: 0;
	left: 100;
	visibility: hidden;
}
.puzzle_1 {float: left; behavior: url(/iepngfix.htc);}
.puzzle_3 {float: left; behavior: url(/iepngfix.htc); }
.puzzle_knockout {behavior: url(/iepngfix.htc);} 
.question {
	float: right;
	width: 270px;
	height: 340px;
	font-family: "Times New Roman", Times, serif;
	font-size: 1.8em;
	color: #1c316e;
	/*background: url(images/question_mark.png) no-repeat;
	background-position: 240px 50px;*/
	behavior: url(/iepngfix.htc);
	position: absolute;
	left: 484px;
	top: 10px;
}
.question_txt {width:240px;padding-top:25px;}
.last_question {
	float: right;
	width: 270px;
	font-family: "Times New Roman", Times, serif;
	font-size: 1.8em;
	color: #1c316e;
	/*background: url(images/question_mark.png) no-repeat;
	background-position: 240px 50px;*/
	behavior: url(/iepngfix.htc);
	position: absolute;
	left: 484px;
	top: 54px;
}
.question_mark { height: 166px; width: 56px; background: url(question_mark.png) no-repeat; position: absolute; top: 8px; right: 0px; behavior: url(/iepngfix.htc);}
.question_mark2 { height: 166px; width: 56px; background: url(question_mark.png) no-repeat; position: absolute; top: 8px; right: 0; behavior: url(/iepngfix.htc);}
.question_mark3 { height: 166px; width: 56px; background: url(question_mark.png) no-repeat; position: absolute; top: 7px; right: 1px; behavior: url(/iepngfix.htc);}
.question_mark4 {height: 166px; width: 56px; background: url(question_mark.png) no-repeat; position: absolute; top: 11px; right: 1px; behavior: url(/iepngfix.htc);}
.question_mark5 {
	height: 166px;
	width: 56px;
	background: url(question_mark.png) no-repeat;
	position: absolute;
	top: 25px;
	right: 2px;
	behavior: url(/iepngfix.htc);
}
.question a {
	text-decoration: none;
	font-size: 0.9em;
	color: #871515;
}
.last_question a {
	text-decoration: none;
	font-size: 0.9em;
	color: #871515;
}
.yes_no, input.yes_no{
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 1em;
	background:Transparent;
	Color:#4B0C0C;
	border:0px;
	margin-top: 15px;
	width:255px;
}
.yes_no_btn {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 1em;
	background:Transparent;
	Color:#4B0C0C;
	border:0px;
}
.no {float:left;padding-left:5px;}
.yes {float:left;padding-right:5px;}
.left_column {
	float: left;
	width: 300px;
}
.right_column {
	float: right;
	width: 400px;
}
.right_column li {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 0.8em;
	line-height: 1.8em;
}
a {color: #871515;}
.results_title {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 1em;
	font-weight: bold;
	color: #1c316e;
}
.question_score {
	margin-top: 10px;
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 1em;
	font-weight: bold;
	color: #871515;
}
.score_color {
	color: #1c316e;
	}
.red_text {
	/*color: #871515;*/
	color: #000000;
}
.list_left {
	width: 330px;
	clear:both;
}
.list_left ol li {
	padding:10px 0px 10px 0px;
}
.list_right {
	width: 330px;
	clear:both;
}
.list_right ol li {
	padding:10px 0px 10px 0px;
}
.answer {color: #871515;}
.contact_column {float: left;}
.expand { display: block; margin-top: 10px;	font-size: 1.2em; }
.hide { display: none; }
#bottom_quote {
	font-family: Georgia, "Times New Roman", Times, serif;
	width: 748px;
	margin-left: auto;
	margin-right: auto;
	padding-top: 20px;
	font-weight: bold;
	text-align: center;
	color: #717b9a;
	padding-bottom: 15px;
	clear: both;}
.form {
	float: right;
	width: 270px;
	font-family: "Times New Roman", Times, serif;
	font-size: 1em;
	color: #1c316e;
	/*background: url(images/question_mark.png) no-repeat;
	background-position: 240px 50px;*/
	behavior: url(/iepngfix.htc);
	position: absolute;
	left: 484px;
	top: 8px;
}
.contact_box {width: 220px; font-size: .9em; }
.finalform {margin-top: 25px;}
#question1 {font-size: .9em; margin-bottom: 10px; font-style: italic; }
#question2 {font-size: .9em; margin-bottom: 10px; font-style: italic; }
#question3 {font-size: .9em; margin-bottom: 10px; font-style: italic; }
#question4 {font-size: .9em; margin-bottom: 10px; font-style: italic; }
#question5 {font-size: .9em; margin-bottom: 10px; font-style: italic; }
#question6 {font-size: .9em; margin-bottom: 10px; font-style: italic; }
.message {clear: both; margin-top: 10px; margin-bottom: 10px; font-family: Georgia, "Times New Roman", Times, serif; font-size: 0.7em; color: #666666; text-align: center;}
<!-- CSS CODE END -->
[+][-]11/07/09 06:20 PM, ID: 25769139Accepted Solution

View this solution now by starting your 30-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

Zones: JScript, Hypertext Markup Language (HTML)
Tags: JavaScript, HTML input, JS Functions
Sign Up Now!
Solution Provided By: HonorGod
Participating Experts: 2
Solution Grade: A
 
[+][-]11/07/09 11:49 AM, ID: 25767746Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/07/09 03:46 PM, ID: 25768663Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/07/09 04:19 PM, ID: 25768772Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/07/09 09:58 PM, ID: 25769551Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/08/09 09:50 AM, ID: 25771177Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/08/09 10:09 AM, ID: 25771232Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625