-
setting window.onerror for IFRAME
I am trying to set an error handler for an IFRAME's contents to the error handler defined on the parent document...
window.onerror = myError;
for (frame=0; frame < document.frames.length; frame++)
{
document.frames[frame].onerror = myError;
}
but it seems that when i set the onerror, JavaScript is interpreting this as a dynamic property and assiging the string representation (the function) of the function myError and not setting it as an event handler. i have seen documentation state that the frames collection of the document "retrieves a collection of all window objects defined by the given document or defined by the document associated with the given window".
is this possible to do in JavaScript? thanks for your help!
Sunish
-
-
document.frames doesn't exist - at least in Firefox, which is DOM-compliant. This may be your problem.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks