Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

window and window.self are different...???

4 views
Skip to first unread message

guitarmanchu

unread,
Mar 20, 2009, 12:58:03 PM3/20/09
to
Can anyone shed some light on this situation?

In the OnDownloadComplete event, we're trying to attach an onload event
handler, but on subsequent calls to OnDownloadComplete, the event handler
appears to be lost.

Here is the pseudocode describing our situation:

((DispHTMLWindow2)document.parentWindow).name = "MyWindow";
((DispHTMLWindow2)document.parentWindow).onload = evtHandler;

In a subsequent OnDownloadComplete call, we query the properties of the
window and get the following strange behaviour:

document.parentWindow.name == "MyWindow"
document.parentWindow.onload == null //evtHandler missing

but...

document.parentWindow.self.name = "MyWindow"
document.parentWindow.self.onload = evtHandler //but here it is..?!?!

How is it possible that the "name" properties are the same, but the event
handler is null in one reference, but correct in the other? Can anyone
explain to me what is going on here?

0 new messages