Forum Moderators: open

Message Too Old, No Replies

JavaScript fitted windows (javaScript:openWin...)

Creating javascript fitted windows

         

paulchwd1

5:29 pm on Nov 5, 2004 (gmt 0)

10+ Year Member



I know how to create fitted windows in javaScript via:

function openWin(page)
{
myWin= open(page, "popupWindow",
"width=475,height=670,status=no,toolbar=no,scrollbars=yes,menubar=no,screenX=0,screenY=0,");
}

and then

<a href="javaScript:openWindow('path to file')">Link Name</a>

problem: only one can be opened at a time, how can i tweak the code so that i can have multiple of these fitted windows at the same time

Bernard Marx

8:29 pm on Nov 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Use a different name for each window (open, 2nd arg).
A window opened with the same name as an existing window just opens the URL in the existing window.


<a href="javaScript:openWindow('path to file','win1')">Link Name</a>
<a href="javaScript:openWindow('path to file','win2')">Link Name</a>

-------

function openWin(page, name)
{
myWin= open(page, name,
...etc...