I have an expandable menu script.
When the menuitem is clicked it expands using this part
/**
actuator.onclick = function() {
var display = menu.style.display;
var statusBox = “sessionCrew”;
statusBox =+ “0”;
this.parentNode.style.backgroundImage =
(display == “block”) ? “url()” : “url()”;
menu.style.display = (display == “block”) ? “none” : “block”;
window.document.scheduleDetail.elements[statusBox].value = display
**/
I am trying to capture the ID of the item being clicked so I can parse the name to write the current display attribute to a hidden text box on my form. The goal is to remember how the menus were expanded and compressed when you return to the page.
By using the hidden boxes when the user leaves the page, I capture the hidden box info to session variables. Then when they return to the page the script reads the session variables and sets the menu open or closed base on how it was left.
Probably more info than needed, but hey maybe there is a better way. I just can’t find a good reference to find out all the properties of parentNode (such as parentNode.style etc)
Thanks!