It is a security violation if you try to access js code from other domain unless you digitally sign it. i think IE, check based on domain name while Mozilla check domain name as well as IP address
new_one is correct about the security violations. That is what a lot of the cross-site scripting issues are about, allowing code from a different domain access code on another site. Because by rule of DOM, if you have access to document.location, then you have access to document, which means you have access to everything on the screen.
OK I understand that, but how would I check if queryWindow is on my same domain? I can't test it against "undefined" or "null" because it's still a valid variable. There must be a test I can perform beforehand, right?
You might be able to do a try/catch block.
Sorry, in that last message it should have been:
Or you could attach an onUnload event...
Gary van der Merwe
How about when you launch a new URL, you open a window to a page on your site that then loads the requested URL into a frame (or iframe)? That way the new window and the frame containing the new page are still objects within your domain, and you can play with their properties.
Fog Creek Home