Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Internet Explorer line 1 char 1 code 0 error

I'm using jQuery+drupal and some jQuery plugins. All is ok with Firefox. But in IE's i'm receiving problem like this.

Line: 1 Char: 1 Error: object expected URL: http://businessway.am

I have included .js files. How to know where is the problem? In which file? Line 1? Which file?

If you can please check site which I gave before.

like image 703
Tigran Tokmajyan Avatar asked Jan 25 '10 14:01

Tigran Tokmajyan


People also ask

How do I get rid of Internet Explorer script errors?

Start Internet Explorer. On the Tools menu, select Internet Options. If you can't see the Tools menu, press Alt to display the menus. On the Advanced tab, clear the Display a notification about every script error box, and then select OK.

Why am I getting a script error message?

“Script error” is what browsers send to the onerror callback when an error originates from a JavaScript file served from a different origin (different domain, port, or protocol). It's painful because even though there's an error occurring, you don't know what the error is, nor from which code it's originating.


2 Answers

You could get this type of errors in case the url of a <script src="...url..."></script> does not return javascript, but some other content (html)

I checked the page, but all scripts with src actually do seem to return javascript. With a bit more digging, it seems that this eval code triggers the error message:

artNoStyleAdding(document)

It looks like it is coming from this script:

<script type="text/javascript">if (Drupal.jsEnabled) {$(document).ready(function(){             window.setTimeout("artNoStyleAdding(document)", 2000);});}</script>

That's the last but one script in the head of the document.

Apperantly you forgot to declare and code the artNoStyleAdding function, whatever it is supposed to do.

like image 50
Roland Bouman Avatar answered Sep 20 '22 20:09

Roland Bouman


I've seen this error come up in IE7 when you have a javascript object with an extra comma on the end.

Example:

  var something = {
    "one": ["a"],
    "two": ["b"],
  };

Should be:

  var something = {
    "one": ["a"],
    "two": ["b"]
  };

IE8, Chrome, and Firefox don't seem to mind it though.

like image 40
Brian Armstrong Avatar answered Sep 17 '22 20:09

Brian Armstrong