Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    Regular Coder ubik's Avatar
    Join Date
    Oct 2005
    Location
    westCoast, usa
    Posts
    347
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Internet Explorer "Page dissapears", IE as Whodini.

    Hello.

    Sorry about the title dont know how to explain this other than:

    This code works in firefox but when I try to test it in Internet Explorer my whole page just dissapears except for the body background image, lol. I dont know what could be causing it. Any help is appreciated thanks.

    Its a simple link rollover and image changes on the side of the page, onmouseout it changes to the image that belongs to the active page.

    Code:
    onload = function() {
      links = document.getElementById('menu').getElementsByTagName('a');
      for (i=0;i<links.length;i++) {
        links[i].onmouseover=function() {
    	pic=this.href.split(".");
    	document.getElementById('pic').src=pic[0]+".jpg";
    	}
        links[i].onmouseout=function() {
    	orig=document.getElementById('active').href.split(".");
    	document.getElementById('pic').src=orig[0]+".jpg";
    	}
      }
    }

    EDIT: oh ok nevermind, I found the problem. IE was buggy cause I named a variable the same as an ID i was calling in the next line "pic".
    Last edited by ubik; 05-30-2006 at 03:59 PM.
    "True knowledge exists in knowing that you know nothing."
    -Socrates


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •