943,892 Members | Top Members by Rank

Ad:
Jun 13th, 2006
0

From Page to Sitemap

Expand Post »
A little backround into the mission: My sitemap is a tree menu, i need to navigate from a page to the tree menu, but in the tree menu, the page that the visitor came from needs to be highlighted.

Here is my code for the tree menu : tree_nodes.js

// Tree structure definition
var TREE_NODES = [
["Module1: Use of Firearms", null, null,
["General Safety and Req of Firearms Control", "#sectionName", null,
["Learning Outcome", null, null],
["Introduction", null, null],
["Safety Considerations", null, null],
["Summary", null, null]],
["Fundamentals of Shooting", "other.html", null,
["Learning Outcome", null, null],
["Introduction", null, null],
["Body Position", null, null,
["The Interview Position", null, null],
["The Ready Position", null, null],
["Kneeling Position", null, null],
["The Prone Position", null, null]],
["Firm Controlled Grip", null, null],
["Correct Sight Picture", null, null],
["Trigger Squeeze", null, null],
["Controlled Relaxed Breathing", null, null],
["Correct Technique for Follow-Through", null, null],
["Fault Identification on the Shooting Range", null, null],
["Psychological Preparation", null, null],
["Summary", null, null]],
["Z88 / Pietro Beretta Pistol", "../other_folder/file.html", null,
["Learning Outcome", null, null],
["Introduction", null, null],
["Names of Visible Parts (External)", null, null],
["Making Safe Procedures", null, null],
["Description", null, null],
["Characteristics", null, null],
["Stripping and Assembling", null, null],
["Names of Internal Parts", null, null],
["Mechanism", null, null],
["Different Carry Conditions", null, null],
["Stoppages (Malfunction)", null, null],
["Immediate Reaction Drill", null, null],
["Cleaning & Maintenance", null, null],
["Magazine Filling", null, null],
["Shooting Range Commands", null, null],
["Summary", null, null]],
["Republic Arm Pistol ", "../other_folder2/file.html", null,
["Learning Outcome", null, null],
["Introduction", null, null],
["Visible Parts", null, null],
["Making Safe Procedure", null, null],
["Description", null, null],
["Characteristics", null, null],
["Stripping", null, null],
["Assembling", null, null],
["Names of Internal Parts", null, null],
["Understanding the Mechanism of the RAP 401", null, null],
["Different Carry Conditions", null, null],
["Maintenance", null, null],
["Magazine Filling", null, null],
["Loading and Unloading", null, null],
["Identification of Stoppages/Malfunctions", null, null],
["Immediate Reaction Drills", null, null],
["Shooting Range Commands", null, null],
["Summary", null, null]],
["R5 Assault Rifle ", "../other_folder2/file.html", null,
["Learning Outcome", null, null],
["Introduction", null, null],
["Visible Parts", null, null],
["Making Safe Procedure", null, null],
["Description", null, null],
["Characteristics", null, null],
["Stripping and Assembling", null, null],
["Names of Internal Parts", null, null],
["Mechanism", null, null],
["Different Carry Conditions", null, null],
["Maintenance", null, null],
["Magazine Filling", null, null],
["Loading and Unloading of the R5", null, null],
["Identifying Stoppages", null, null],
["Rectification of Malfunctions/Misfires", null, null],
["Shooting Range Drills", null, null],
["Summary", null, null]],
["Musler 12 Gauge Shotgun ", "../other_folder2/file.html", null,
["Learning Outcome", null, null],
["Introduction", null, null],
["Visible Parts", null, null],
["Making Safe Procedure", null, null],
["Description and Characteristics", null, null],
["Stripping and Assembling the Musler", null, null],
["Maintaining the Musler", null, null],
["Names of Parts", null, null],
["Mechanism", null, null],
["Different Carry Conditions", null, null],
["Magazine Filling", null, null],
["Identification of Stoppages", null, null],
["Rectification of Stoppages", null, null],
["Shooting Range Commands", null, null],
["Summary", null, null]],
["Tactical Shooting Techniques ", "../other_folder2/file.html", null,
["Learning Outcome", null, null],
["Introduction", null, null],

["Draw and Fire in Condition 2", null, null],
["Single-Hand Firing", null, null],
["Magazine Change", null, null],
["Draw/Turn and Fire in Different Directions", null, null],
["Instinctive Shooting", null, null],
["Shoot in a Ready Position", null, null],
["Shoot from Behind Cover", null, null],
["Technique to Shoot During Low Light Situations", null, null],
["Summary", null, null]],
],
["Module2: Legal Principles", null, null,
["Private Defence", "#sectionName", null],
["Use of Force in Arrest", "other.html", null],
["Section 49 - Use of Deadly Force", "../other_folder/file.html", null],
["Police Directives - Use of Firearms", "../other_folder2/file.html", null],
["Requirements of Firearms Control Act 2000", "../other_folder2/file.html", null]
],
["Module3: Obstacle Shooting Course", null, null,
["Introduction", "#sectionName", null],
["Activities and Assessment", "other.html", null]
],
["Module4: Simulated Exercises", null, null,
["Introduction", "#sectionName", null],
["Simulation Excercise", "other.html", null]
]
];



Here is my code for the tree menu : tree_format.js

// Tree format definition
var TREE_FORMAT = [
// 0. left position
10,
// 1. top position
10,
// 2. show buttons ("+" and "-" images)
true,
// 3. button images: collapsed state, expanded state, blank image
["graphics/collapsed_button.gif", "graphics/expanded_button.gif", "graphics/blank.gif"],
// 4. size of buttons: width, height, indent amount for childless nodes
[16, 16, 16],
// 5. show icons ("folder" and "document")
true,
// 6. icon images: closed folder, opened folder, document
["graphics/closed_folder.gif", "graphics/opened_folder.gif", "graphics/document.gif"],
// 7. size of icons: width, height
[16, 16],
// 8. indent amount for each level of the tree
[0, 16, 32, 48, 64, 80, 96, 112, 128],
// 9. background color for the tree
"",
// 10. default CSS class for nodes
"treeNode",
// 11. individual CSS classes for levels of the tree
[],
// 12. "single branch" mode
false,
// 13. padding and spacing values for all nodes
[0, 0]
];

Note: Nothing is linked as yet
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
gendv is offline Offline
18 posts
since Jun 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: Changing the colour of the arrows of a select menu in a form
Next Thread in HTML and CSS Forum Timeline: I feel like an Idiot, so plz HELP!





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC