1

In my magento website i have a problem with some javascript. Most of my theme extensions which uses javascript don't work. It's related to jQuery.

When i use firebug i get this error:

Fout: uncaught exception: [Exception... "Could not convert JavaScript argument arg 0 [nsIDOMWindow.getComputedStyle]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: http://REMOVED/js/jquery/jquery.js :: :: line 12" data: no]

I have no idea what this is. Maybe someone can help me in the right direction.

3 Answers 3

1

You need to add :

if (elem == document) elem = document.body;

before your var computedStyle is declared.

This works for me.

Sign up to request clarification or add additional context in comments.

Comments

0

I got this error when I was passing an empty string to a "news ticker" plugin. My guess is that the plugin was attempting to get the style information from an element which didn't exist (hence nsIDOMWindow.getComputedStyle). Check your AJAX responses for empty strings, which was my problem.

Comments

0

I got this error in a jQuery event function. I called the function manually, providing an event object. A call to $(this) inside of the function caused that very error. Without triggering the event correctly, jQuery won't set the this object for you.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.