1

I am creating a website and it doesn't work in some IE's, it actually crashes. The problem is that it works fine on my computer.

My htmlcode is W3C compliant, so at least it's no rookie mistake, but unfortunately my knowledge of the deeper workings is very limited.

Here's a list of the JS-libraries I use:

    <script type="text/javascript" src="jquery-1.4.4.min.js"></script> 
    <script type="text/javascript" src="jquery.easing.1.3.js"></script> 
    <script type="text/javascript" src="jquery.coda-slider-2.0.js"></script> 
    <script type="text/javascript" src="http://s7.addthis.com/[omitted for security]"></script>

Works perfectly in Chrome, FF and IE for me, but not on other computers (including my clients', which is frustrating).

Here's a link: http://www.demensentuin.be/indexgeheim.php

Pekka
  • 442,112
  • 142
  • 972
  • 1,088
joon
  • 832
  • 13
  • 31
  • What exactly doesn't work? What errors do you get? Needs more info – Pekka Mar 08 '11 at 22:29
  • works fine for my IE too , check what version of IE your client is using . – yogsma Mar 08 '11 at 22:29
  • 3
    Standard Website, and IE? Your suprised it's broken? The answer is IE does not work with standards. – Raynos Mar 08 '11 at 22:29
  • Problem confirmed in IE6 and IE7; works in IE8. @Raynos that's not always the reason – Pekka Mar 08 '11 at 22:30
  • It is not about rookieness, you will find IE6-IE8 is meant to be mean. – amosrivera Mar 08 '11 at 22:31
  • @Pekka whenever something is broken in IE. 95% of the time it's because IE does something stupid. I guess my statistics are skewed because I debug in firefox/chrome and double-check IE. – Raynos Mar 08 '11 at 22:31
  • I can't see anything obviously wrong. (as a point of note, omitting the addthis URL for security doesn't actually do anything, since it's in the source of the actual site.) – Dan Davies Brackett Mar 08 '11 at 22:32
  • If you're talking about IE6, there's a lot in jquery easing that won't work right. If that's important, consider making conditional code to use a basic effect instead when IE<8 present. Also just FYI, *we can see your addthis.com include on your web site*. – Jamie Treworgy Mar 08 '11 at 22:32
  • 1
    @Raynos in this case, it's because IE sticks to standards and the others do not. :) See my answer. You're right in regards to the other 99%, though, of course. – Pekka Mar 08 '11 at 22:32
  • @Pekka I didn't look at the code. I actually find that half the bugs are because IE isn't very fault tolerant. Rather then kind of doing what it thinks you want it just halts and crashes. Firefox/Chrome have a habit of fixing bad code under the hood for you. – Raynos Mar 08 '11 at 22:36
  • @Raynos well, that is one behaviour that I actually *like* about IE... Nothing wrong with stringent parsing, and stopping when stuff is unclear. If it would just stick to standards in the gazillion other cases where it does not.... – Pekka Mar 08 '11 at 22:38
  • 1
    you do know we can just goto the page and right click > view source to get the missing bit :/ just an fyi – Stuart Blackler Mar 08 '11 at 22:39
  • @SBlackler, good point, I was just a bit scared to post guid's, since the page also has PHP. But yeah, dumb :p – joon Mar 08 '11 at 22:52
  • Thanks A LOT everyone, that was... really quick and thorough. I'll have to do some more research and I'll get back to you (this question was the last thing out of my office for the day, so :p...) – joon Mar 08 '11 at 22:52

2 Answers2

9

The reason for the problem is the one instance where IE is more standards compliant than the other browsers :)

This block

$('#header').delay(250).animate({
 'padding-top': headertop,
 'margin-left': headerleft, 
},250);                   ^-------------------- HERE

has an extra comma at the end of the property list which is invalid syntax, but gets swallowed by FF, Chrome and the like.

IE8 seems to have relaxed its parsing behaviour for this. It's only 6 and 7 that complain.

(There may be other problems that come to light after this is fixed, but this is where IE currently stops parsing.)

Helpful resources:

Community
  • 1
  • 1
Pekka
  • 442,112
  • 142
  • 972
  • 1,088
0

On IE6, I get the error popup:

Line: 94
Char: 7
Error: Expected identifier, string, or number
Code: 0
URL: http://www.demensentuin.be/indexgeheim.php

But then the site loads. Does this help at all?

jcomeau_ictx
  • 37,688
  • 6
  • 92
  • 107