views:

20

answers:

1

Hi,

Im using a flex plugin with a methode:

ExternalInterface.call("initialize_width");

This calls a jQuery Function witch initializes the width of the window:

function initialize_width(){
   $("#nav_content").css("width",900);
}

It works perfectly on all the browsers expect Internet Explorer...

It says: "'null' is null or not an object", and points to:

try { document.getElementById("").SetReturnValue(__flash__toXML(initialize_width()) ); }
catch (e) { document.getElementById("").SetReturnValue("<undefined/>"); }

I've no idea what the problem should be as the place where the debugger points to is pointing to automatically created code..

Any help? Thanks Markus

A: 

Why are you using document.getElementById("")?

This will return null every time, and you're trying to then call a method on null.

If that's just a code error, then make sure the ID you're getting the element of is the only element on the page with that ID, as there may be a conflict there.

Additionally, you can use

$("#nav_content").width(900);

instead of your css call (though I can't see that fixing your problem).

EMMERICH
Thanks for your answer, nav_content is only used once... I'm Asking myself witch object should SetReturnValue? Might be something with the ExternalInterface call?
Markus