I have the following bit of _javascript_:
node.childNodes[0].> {
showHideAllDivs
(
navRoot.parentNode.id,
this.innerHTML.replace(/[^A-Za-z]/g,""),
this.id
);
return false;
} [white space modified for e-mail]
This dynamically assigns a function call to the onClick event of several anchor tags for some DHTML shenanigans.
The trouble is that the first parameter of the showHideAllDivs() function needs to be the value of navRoot.parentNode.id at the time of this assignment (navRoot is initialized before this code), but instead the event is being created with the navRoot.parentNode.id value un-resolved and it is being resolved at runtime when the anchors are clicked on. Unfortunately it is then the wrong value and I get errors that I spent a very long time tracking down to this cause.
There has got to be a way to write this to say use the value of navRoot.parentNode.id right now, not wait until later to resolve the value?
TIA
--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
"C code. C code run. Run code run. Please!"
- Cynthia Dunning
Confidentiality Notice: This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
