...

View Full Version : Understanding IE page load error



sohopigeon
06-28-2010, 01:32 PM
Hello,

I'm getting a warning in IE7 that my page loads with errors
8671

I don't understand where to look to locate the errors?

www.cranihum.com

Please help

thanks

PS http://validator.w3.org/check?uri=http%3A%2F%2Fwww.cranihum.com%2F

Rowsdower!
06-28-2010, 02:18 PM
Hello,

I'm getting a warning in IE7 that my page loads with errors
8671

I don't understand where to look to locate the errors?

www.cranihum.com

Please help

thanks

PS http://validator.w3.org/check?uri=http%3A%2F%2Fwww.cranihum.com%2F

That's a javascript error. Tracking that down in IE is a real pain. I see a lot of people recommend Microsoft Script Editor for that. If you have Windows XP that should be a on your PC already (see here (http://blogs.msdn.com/b/ie/archive/2004/10/26/247912.aspx) for how to enable it). If not, I believe you can buy it. I've never used it, but it gets a lot of attention from people posting blogs on js debugging for ie.

I also came across this:
http://www.berniecode.com/blog/2007/03/08/how-to-debug-javascript-with-visual-web-developer-express/

That was written in 2007 so I'm not sure if that method still works with Visual Web Developer Express 2010 (http://www.asp.net/vwd/) or if VWD Express 2010 already supports this javascript debugging for free (apparently in 2007 it did not). It's probably worth a look too, though.

At any rate, it's not really an HTML/CSS issue.

sohopigeon
06-28-2010, 02:26 PM
Thank you, I'll check out those links

Kor
06-28-2010, 05:07 PM
"expected identifier, string or number"

This error message is due to an Array or JSON object syntax problem. In early versions of JavaScript the elements of an array (or of an object) should be separated by comma, but the last element should not have the last comma at the end:


var myArray=[
'a',
'b',
'c' // note that here there is no comma
]
var myObject={
'a':'avalue',
'b':'bvalue',
'c':'cvalue' // note that here there is no comma
}

Modern browsers have modified this rule, as the new JavaScript versions have changed a little bit, thus the last comma became optional. But IE6 and IE7 are not "modern" browsers, thus for them the last comma remains forbidden. In other words IE 7 expects another identifier element after a last comma in an array or in an object.

All you have to do is to check the arrays and/or the JSON objects within the javascript codes and remove that "the last" comma from somewhere.

As a note: the code works ok in IE8. Problems occur only in IE < 8

sohopigeon
06-28-2010, 06:13 PM
Thank you Kor,

That was exactly the problem, I have located and deleted the errant comma :-)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum