745
edits
Changes
Chapters
,no edit summary
<html>
<script>
var people chapters = new Array();function personchapter(firstNamechapterName, lastNamefoundingDate, agelocation, url) { this.FirstName ChapterName = firstNamechapterName; this.LastName FoundingDate = lastNameparseInt(parseFloat(foundingDate)); this.Age Location = location; this.URL = parseInt(parseFloat(age))url;
}
function drawArray(form) {
var v = "<table style='width:100%;'>"; for (var i=0; i<peoplechapters.length; i++) { v += people"<tr><td><a href='" + chapters[i].FirstName URL + " '>" + peoplechapters[i].LastName ChapterName + " (</a></td><td>" + chapters[i].FoundingDate + "</td><td>" + peoplechapters[i].Age Location + ")<br>";
}
document.getElementById('list').innerHTML = v+ "</table>"
}
window.onload = function(){
drawArray();
}
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
}
function sortByLastNamesortByLocation(a, b) { var x = a.LastNameLocation.toLowerCase(); var y = b.LastNameLocation.toLowerCase();
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
}
return ((x < y) ? -1 : ((x > y) ? 1 : sortByFirstName(a, b)));
}
function sortByAgesortByFoundingDate(a, b) { var x = a.AgeFoundingDate; var y = b.AgeFoundingDate;
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
}
function sortArray(form, column) {
if (peoplechapters.length == 0) {
alert("Please add one or more people before sorting!");
return false;
switch (column) {
case 1 :
break;
case 2 :
break;
case 3 :
break;
case 4 :
break;
}
// -->
</script>
<table style='width:100%'><tr><td><div onclick="sortArray(document.forms['Demo'], 1)">Chapter Name</div></td><td><div onclick="sortArray(document.forms['Demo'], 2)">Founding Date</div></td><td><div onclick="sortArray(document.forms['Demo'], 3)">Sort by AgeLocation</div></td></tr></table></html>
----