Advertisement

07.03.2008 at 01:37PM PDT, ID: 23538133
[x]
Attachment Details

hielo, please explaine how this code works.

Asked by megnin in JavaScript

Tags: JavaScript

hielo,

I like your code very much, would you be kind enough to explain how it works to me?  Thank you.

-DavidStart 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:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd"> 
<html>
<head>
<title></title>
<script type="text/javascript">
var alpha=null;
var numeric=null; 
function toggle(label, listContainer)
{ 
	if( alpha==null && numeric==null)
	{
		alpha = document.getElementById(listContainer).innerHTML;
		numeric = alpha.split("<BR>");
		numeric.sort();
		numeric = numeric.join("<BR>");
	} 
	if( String(label.innerHTML).toLowerCase() != "sort alphabetically" )
	{
		label.innerHTML="Sort Alphabetically"
		document.getElementById(listContainer).innerHTML =numeric;
	}
	else
	{
		label.innerHTML="Sort Numerically"
		document.getElementById(listContainer).innerHTML = alpha;
	}
return;
}
</script>
</head>
<body>
	<span style="border:3px inset gray;background-color:navy; color:white;font-weight:bold;" onclick="toggle(this,'policyList')">Sort Numerically</span>
<div id="policyList">
	<a href="DOCS/Policies/OPS/520 - Assessment Of Reading And Mathematics.pdf" target="_blank">520 - Assessment Of Reading And Mathematics</a><br>
	<a href="DOCS/Policies/OPS/517 - Bus Passes.pdf" target="_blank">517 - Bus Passes</a><br>
	<a href="DOCS/Policies/OPS/528 - Childcare.pdf" target="_blank">528 - Child Care</a><br>
	<a href="DOCS/Policies/OPS/516 - Incentive Vouchers.pdf" target="_blank">516 - Clothing/Incentive Vouchers</a><br>
	<a href="DOCS/Policies/OPS/527 - Confidentiality of participant information.pdf" target="_blank">527 - Confidentiality Of Participant Information</a><br>
	<a href="DOCS/Policies/OPS/511 - Designation of Satellite One-Stops and Level of Responsibilities.pdf" target="_blank">511 - Designation Of Satellite One-Stops And Level Of Responsibilities</a><br>
	<a href="DOCS/Policies/OPS/530 - Drug and Background Screening.pdf" target="_blank">530 - Drug Screening And Background Checks</a><br>
	<a href="DOCS/Policies/OPS/531 - Earned Income Tax Credits.pdf" target="_blank">531 - Earned Income Tax Credit</a><br>
	<a href="DOCS/Policies/OPS/504 - Eligibility Barriers for Youth.pdf" target="_blank">504 - Eligibility Barriers For Youth</a><br>
	<a href="DOCS/Policies/OPS/532 - Emergency taxi service.pdf" target="_blank">532 - Emergency Taxi Service</a>
</div>
</body>
</html>
 
Loading Advertisement...
 
[+][-]07.03.2008 at 01:49PM PDT, ID: 21928927

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

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

 
[+][-]07.03.2008 at 01:54PM PDT, ID: 21928969

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

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

 
[+][-]07.03.2008 at 02:08PM PDT, ID: 21929082

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.

 
[+][-]07.03.2008 at 02:16PM PDT, ID: 21929152

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
Tags: JavaScript
Sign Up Now!
Solution Provided By: hielo
Participating Experts: 3
Solution Grade: A
 
 
[+][-]07.03.2008 at 02:16PM PDT, ID: 21929155

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

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

 
[+][-]07.03.2008 at 02:21PM PDT, ID: 21929199

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

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

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