I would very much like to make
Konqueror my browser of choice,
but I'm having some difficulty rendering the dynamic DIV
layers which make up much of my website. Honestly, I don't know if it's
a logic error or some form of ignorance on my part, or if there is a
problem with Konqueror itself.
To see how I am attempting create the mouseover/dynamic content effect,
you may look at the source for the left and right frames of the
front page. Basically,
the right ("info") frame imports a JavaScript function
called links_show(), and each section of content is divided
up using DIV tags with unique IDs. Then each
link within the left frame calls the
parent.info.links_show() function, passing as an argument
a string which corresponds to one of the DIV IDs.
Here is the JavaScript I'm trying to use to create the effect
(layer_str is the DIV ID argument to the
function, and last_visible is the DIV ID
of the layer revealed by the function during the previous call):
if (document.getElementById) {
// -------------------------------------------------
// Must be Mozilla, Netscape 6, Konqueror, or Opera,
// which use the W3C DOM
// -------------------------------------------------
document.getElementById(last_visible).style.visibility
= "hidden";
document.getElementById(layer_str).style.visibility
= "visible";
As you can see, I'm attempting to use the W3C Document Object Model (DOM)
Layer 1 API. There is also code present to use the
document.all model used by IE and which
Konqueror also supports, but I
met with no success there, either.
I know this function is getting called successfully, since I've put
window.open() calls in there to test. It appears as though
document.getElementById() always returns null
for some reason.
The W3C DOM Layer 1 syntax is correct, too, as far as I know, since it appears to work fine with Mozilla 0.7 and Opera 5.
Any help or insight would be sorely appreciated. I've wasted an entire day trying to figure out this one problem (but at least I learned a lot about the DOM in the process ;).