Solved

"Unspecified error" in IE 6 and IE 7

Posted on 2007-03-20
7
371 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

828 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