Petar Popara wrote:
Sometimes, on some (Windows) PCs, I got this error message:
Error: myObj.myFunc is not a function
Source file: file:///C:/Test/test.html
Line: 27
<embed type="application/myapp-plugin" width=1 height=1 hidden="true">
<script>
function DoSomething()
{
var myObj = document.embeds[0];
if (myObj == null)
alert("null!");
else
alert("not null!");
var x = myObj.myFunc();
The problem is that this happens only somethimes and not allways. :( Why?
How can I debug it?
When are you calling that function that tries to access the method that
plugin exposes? Consider to wait until
window.onload
respectively
<body onload
has fired so that the DOM with the embed element object has been built
_and_ that plugin has been loaded so that it can expose its methods.
--
Martin Honnen
http://JavaScript.FAQTs.com/
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom