Link to home
Start Free TrialLog in
Avatar of pnoeric
pnoericFlag for United States of America

asked on

"Unspecified error" in IE 6 and IE 7

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...
Avatar of Badotz
Badotz
Flag of United States of America image

Put

debugger;

onto its own line and step through the code to see the real eror.
Avatar of jenzhang2000
jenzhang2000

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.
Is your Javascript in an external file?  If it is, line 1 refers to the Javascript file, NOT the HTML page.
Avatar of pnoeric

ASKER

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!!!
ASKER CERTIFIED SOLUTION
Avatar of Badotz
Badotz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pnoeric

ASKER

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

No worries - glad to help.