Skip to content Skip to sidebar Skip to footer

The Script Does Not Work In Ie. How Can I Fix It?

There is a script that changes the page template depending on the user's monitor screen resolution. However, it does not work in IE. Advise how to fix it, please. <

Solution 1:

outerWidth is supported by IE, but since from the IE9.

Replacement

Solution 2:

Not all browsers have the window.outerWidth and window.outerHeight properties. Geek Daily has a good post on cross-browser window size detection. I'd suggest looking there. As an example, here's what I get in each browser on a desktop with 1280x1024 resolution.

Chrome

window.outerWidth1288document.body.offsetWidth1264document.documentElement.offsetWidth1280

Firefox

window.outerWidth1288document.body.offsetWidth1238document.documentElement.offsetWidth1264

IE7 Doctype Defined

window.outerWidthundefineddocument.body.offsetWidth1260document.documentElement.offsetWidth1260

IE7 No Doctype/Quirks Mode

window.outerWidthundefineddocument.body.offsetWidth1260document.documentElement.offsetWidth1280

Solution 3:

I see a few other problems

  • All of your attribute values should be in quotes. for example. id="value"
  • you have LEFT spelled 1(number 1)eft

Post a Comment for "The Script Does Not Work In Ie. How Can I Fix It?"