is there a way to get window.self of an unknown iframe (same domain) with the only reference: an object within the iframe (a div). holding thumbs for this one
+3
A:
element.ownerDocument.defaultView in Firefox.
element.ownerDocument.parentWindow in IE.
But Webkit (Safari) apparently doesn't support either of those things, so to get your page to work in Safari, you have to use this amazing hack.
Jason Orendorff
2010-01-28 09:55:15
thanks jason - this is what im looking for - shot.By the way - the amazing hack - seems to be for older safari..but WebKit? did initially not do that. So in old versions of Safari there is no property to do this so we use a hack that...
Johnny Darvall
2010-01-28 22:21:11
A:
If the script is running within the iframe, then just do window. If the script is running outside of the iframe, then follow Jason's advice.
If you need a reference take a look at the Gecko DOM reference and MS Msdn.
Helgi
2010-01-28 10:02:22