Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q722 Is there any way I can share the window object amongst all of my webpages, so that the window gets created only once, and I can just call window.focus() to pop it up every time, no matter which page the user chooses it from?

irt.org | Knowledge Base | JavaScript | Window | Q722 [ previous next ]

Q722 Is there any way I can share the window object amongst all of my webpages, so that the window gets created only once, and I can just call window.focus() to pop it up every time, no matter which page the user chooses it from?

Yes, place the JavaScript code in the parent frameset and invoke it from there, for example:

<HTML>
<HEAD>
<SCRIPT>
handle = '';
function myOpen(url) {
    handle = window.open(url,....)
}
</SCRIPT>
</HEAD>

<FRAMESET>
...
</FRAMESET>
</HTML>

And then in any page:

<SCRIPT>
parent.myOpen('http://www.irt.org');
</SCRIPT>

Feedback on 'Q722 Is there any way I can share the window object amongst all of my webpages, so that the window gets created only once, and I can just call window.focus() to pop it up every time, no matter which page the user chooses it from?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.