OK, a bit of a problem:
I have a dynamically generated page that has a rollover div that needs to be displayed for each of a number of links.
Now, this is easy enough to do on a small scale: as part of the loop that dynamically generates the page, I have a separate hidedivlinkID() and showdivlinkID() function, and it works really well except in NS4.x, which I'm not supporting.
However, once the list of links grows to a certain size--and in this case the list has grown to about 150--the page takes on a rather large size. At this point, it's around 250K.
What I'd like to do is have a single pair of functions in the header script:
function showdiv(linkID) { }
function hidediv(linkID) { }
Such that I can call them easily. The problem comes in at the point where I try to pass the linkID out of the function, into the style-changing parts of the function. To wit:
doesn't work. (The "legend" div is separate and unique; it's not overduplicated). Similarly,PHP Code:function showdiv(linkID) {
linkID.style.visibility = "visible"
document.getElementById("legend").style.visibility = "hidden"
} // End showdiv
doesn't work.PHP Code:function showdiv(linkID) {
document.getElementById(linkID).style.visibility = "visible"
document.getElementById("legend").style.visibility = "hidden"
} // End showdiv
Is there any way to make this work... or am I stuck with a bunch of extra functions on my page?
Eric Snyder II
(Edit: Closed tag. --ES2)





Bookmarks