• Take a look at my site, http://www.workingbath.com/ in Firefox first, and click on the tabs at the top. Now open my site in IE and try clicking on the tabs, it doesn’t work.

    Here is the code:

    function toggleTwoDivs(divToGoOn) {
    thisDiv = document.getElementById(divToGoOn);
    arch = document.getElementById('arch');
    lnks = document.getElementById('lnks');
    abut = document.getElementById('abut');

    if (thisDiv == arch) {
    lnks.style.display = "none";
    abut.style.display = "none";
    if (thisDiv.style.display == "none") {
    thisDiv.style.display = "block";
    }
    else {
    thisDiv.style.display = "none";
    }
    }
    if (thisDiv == lnks) {
    arch.style.display = "none";
    abut.style.display = "none";
    if (thisDiv.style.display == "none") {
    thisDiv.style.display = "block";
    }
    else {
    thisDiv.style.display = "none";
    }
    }
    if (thisDiv == abut) {
    lnks.style.display = "none";
    arch.style.display = "none";
    if (thisDiv.style.display == "none") {
    thisDiv.style.display = "block";
    }
    else {
    thisDiv.style.display = "none";
    }
    }
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • I see that this is still broken in MSIE. I ran it through W3.org ‘s validator and found all kinds of problems that seem to stem from a couple of small things. You’re more familiar with it, so you might want to check this out.

    MSIE and javascript, especially when it involves CSS, has some whacky things it does. You might want to search the net for things more closely related to this. It’s quite the feature.

    Please try to declare the variables that you used.
    e.g.
    var thisDiv,… etc.;

    //frendel 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘javascript not working in IE’ is closed to new replies.