IE10 won't load the JavaScript on my site

mikeymikec

Lifer
May 19, 2011
19,411
12,937
136
There's a couple of bits of code pertaining to Internet Explorer:

Code:
  <!--[if lte IE 8]>     <link rel="stylesheet" type="text/css" href="ie.css">   <![endif]-->    <!--[if gt IE 8]>     <link rel="stylesheet" type="text/css" href="default.css">   <![endif]-->
Code:
var appName = window.navigator.appName; if (appName !== "Microsoft Internet Explorer")   document.write("<link rel=\"stylesheet\" type=\"text\/css\" href=\"default.css\" \/>"); //]]>
But it doesn't look like that either bit of code gets run by IE10. It's fine in IE9.

Looking at my code again, I realise I can chop it a bit because my site is fine in IE9 (and hopefully 10 once this is sorted). Some bits are just modified from IE6/7/8 days.

I've tried resetting IE to default settings and running in no-addons-mode, but it doesn't make any difference.
 

colonelciller

Senior member
Sep 29, 2012
915
0
0
stackoverflow is a good place to ask questions like this

...and i often find that any problem i have with such things has aready been figured out by someone somewhere... good luck :)
 

mikeymikec

Lifer
May 19, 2011
19,411
12,937
136
Thanks. I'll post on that site as soon as I understand their posting rules for code!
 

airdata

Diamond Member
Jul 11, 2010
4,987
0
0
There's a common problem where browser files simply don't have IE10 information listed and can cause various website issues. I think it's becoming more and more clear as people are getting windows 8 systems up w\ ie10 and finding sites not displaying correctly and having various issues.

Goto google and search ' ie10 browser files' and see if that will fix your issues as well.
 

mikeymikec

Lifer
May 19, 2011
19,411
12,937
136
My site's problem was that it used conditional comments to handle IE versions (designed to target <=v8 and handled v9 properly), and IE10 ignores conditional comments.

No-one on stackoverflow actually read the code I posted. It was a silly mistake I had made, and I figured it out myself in the end and learnt a bit more JavaScript in the process :) (which I'll probably forget because I touch JavaScript code about once a year or less)
 
Last edited: