Hi, I recently discovered that if the element I pass in for the
SWFObject to be written into is null, the error I get back is "n is
null", which had me befuddled for a little while.  I figured out what
was wrong because Firebug showed me the relevant lines of code, but it
seems that the error message could be changed to be something more
descriptive, like "element not found: div_flashGoesHere_typo".

Example of my code:
 var so = new SWFObject("usindexesview.swf", "usindexesview", "1000",
"450", "9", "#eeeeee");
 so.write('div_flashGoesHere_typo');

My page does have a div element called 'div_flashGoesHere' but not one
called 'div_flashGoesHere_typo'.  The error comes on these lines in
swfobject.js:

125      var n = (typeof elementId == 'string') ?
document.getElementById(elementId) : elementId;
126      n.innerHTML = this.getSWFHTML();

So the error I get is "n is null", which happens on line 126.

At the very least, it would help if the variable were renamed
'element' or something more descriptive than 'n', but I leave the
implementation details up to you.  :-)

Thanks for making a great little script!  I'm just hoping I can help
make it a bit better.

Jean
-- 
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en.


Reply via email to