Page is a not externally linkable
moonbiter - 7:41 pm on Aug 27, 2002 (gmt 0)
and call it like: and so on. <added>
Just code portability. If you want to put the window open into a function, you can call it from a lot of different links on the page and just pass it arguments in the function call. So you could have: function openWindow(url) {
var window_name = window.open(url,'window_name','screenX=0,screenY=0,top=0,left=0');
}<a href="#" onclick="openWindow('foo.htm')">Foo link</a>
<a href="#" onclick="openWindow('foo2.htm')">Foo link 2</a>
<a href="#" onclick="openWindow('foo3.htm')">Foo link 3</a>
Plus, you'll need to put the window into a variable to get the window.close() method to work from another window.
</added>