Jump to content
xisto Community

occorled

Members
  • Content Count

    1
  • Joined

  • Last visited

  1. Hello I have a simple .js file that seems to work in Firefox but not IE. The error could totally be my syntax, just not sure why it's working in one browser and not the other.All I'm doing is waiting for an image to load completely before redirecting. I added an extra step that waits an additional 1.5 seconds just for 100% smooth transition (sometimes firefox reroutes before the image is actually fully loaded). This script works perfectly for Firefox, meaning if the image is already loaded/cached it reroutes immediately and if not, then waits with extra delay. In IE however, it ALWAYS waits.... for some reason the logic of checking the image "complete" is not working properly.Any ideas?--------------------------------------------- // main background imageobjImage = new Image();objImage.src='main.jpg';objImage.name='main';// if cached, then go right to home page, otherwise wait for it to load with delayif ( objImage.complete ) { reroute();}else { objImage.onLoad=extradelay();}function extradelay(){ window.setTimeout("reroute()", 1500);}function reroute(){ document.location.href='home.html';} ---------------------------------------------
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.