Solved

"Unspecified error" in IE 6 and IE 7

Posted on 2007-03-20
7
369 Views
Last Modified: 2013-12-08
I have a web site with some heavy-duty Javascript stuff going on... in IE, I'm getting an "Unspecified error" (but everything seems to work perfectly). In Firefox, everything works perfectly and there are no errors or warnings at all from JS.

The exact error message is "Unspecified error" and it refers to line 1, character 36 of my code.

These are the very first two lines of my file:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">


Interestingly, character 36 is the "X" in "XHTML"... could it be complaining because my Javascript libraries aren't XHTML compliant somehow?

This all seems like a shady IE bug ;-) but I would like to make the error message indicator go away, if possible. It makes the customers uncomfortable...
0
Comment
Question by:pnoeric
7 Comments
 
LVL 29

Expert Comment

by:Badotz
ID: 18759608
Put

debugger;

onto its own line and step through the code to see the real eror.
0
 
LVL 1

Expert Comment

by:jenzhang2000
ID: 18759670
What js library are you using?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">  shouldn't cause any problem for a regular html page.
0
 
LVL 15

Expert Comment

by:stanscott2
ID: 18759850
Is your Javascript in an external file?  If it is, line 1 refers to the Javascript file, NOT the HTML page.
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

Author Comment

by:pnoeric
ID: 18766947
Hm. I have probably 5 Javascript files floating around in there, so it's very difficult to isolate the issue. I think it might be related to the prototype library, since the error is only triggered when I call a function to bring a layer forward. Hm. I'll look into upgrading prototype, maybe.

Any other suggestions to debug? When I use the debugger; command, I get an error from the script debugger: "unknown exception." It also says it's unable to display the script where the error occurred. Useless!!!
0
 
LVL 29

Accepted Solution

by:
Badotz earned 250 total points
ID: 18766966
Yeah, right. Make sure you've enabled debugging in IE

Display all script errors...
Display a notification...

etc.
0
 

Author Comment

by:pnoeric
ID: 18767173
Aha. I ended up using the debugger to step through everything from the start, and that got me to the place I needed to be. Turns out that this:

   $('myobj').filters.item('DXImageTransform.Microsoft.Alpha').opacity = 100;

is not valid, but this:

   $('myobj').style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity=100);';

is okay... grr IE makes me crazy :-)

thanks for your help.

E

0
 
LVL 29

Expert Comment

by:Badotz
ID: 18767225
No worries - glad to help.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question