I use a subroutine to popup windows in my sebsite. It looks like this :
function poplink(filenam e)
{
filestring = filename + "htm"
LinkWindow = window.open(fil estring,'LinkWi ndow','');
}
Filename is just the extensionless web page name e.g. "Addresses"
Problem is of course every window popped up will replace the previously
popped up window and in the case of a popped up window popping up a window
the new window will just replace the calling window.
(Please, no lectures on popping up windows, I need to in my particular case
and here I'm just stripping it down to the bare problem for claritie and
simplicities s sake)
I'd be happy if I could create a new window handle each time so that all my
popup windows will be unique. If it could be the filename that would be fine
e.g. instead of the window handle variable being "LinkWindow " it would be
"Addresses" . Is there some way of making the variable I assign the new
window to a variable? All I can come up with is somehow having LinkWindow an
array of window handles and just keep incrementing it e.g.
LinkWindow[100]; // 100 is more than enough windows for a typical session
LinkWindowCount = 0;
function poplink(filenam e)
{
filestring = filename + "htm"
LinkWindow[LinkWindowCount] = window.open(fil estring,'LinkWi ndow','');
if (LinkWindowCoun t < 99)
LinkWindowCount ++;
else
LinkWindowCount = 0;
}
What would be the correct syntax for creating LinkWindow as an array or is
there a better way of accomplishing the same thing?
Thanks!
function poplink(filenam e)
{
filestring = filename + "htm"
LinkWindow = window.open(fil estring,'LinkWi ndow','');
}
Filename is just the extensionless web page name e.g. "Addresses"
Problem is of course every window popped up will replace the previously
popped up window and in the case of a popped up window popping up a window
the new window will just replace the calling window.
(Please, no lectures on popping up windows, I need to in my particular case
and here I'm just stripping it down to the bare problem for claritie and
simplicities s sake)
I'd be happy if I could create a new window handle each time so that all my
popup windows will be unique. If it could be the filename that would be fine
e.g. instead of the window handle variable being "LinkWindow " it would be
"Addresses" . Is there some way of making the variable I assign the new
window to a variable? All I can come up with is somehow having LinkWindow an
array of window handles and just keep incrementing it e.g.
LinkWindow[100]; // 100 is more than enough windows for a typical session
LinkWindowCount = 0;
function poplink(filenam e)
{
filestring = filename + "htm"
LinkWindow[LinkWindowCount] = window.open(fil estring,'LinkWi ndow','');
if (LinkWindowCoun t < 99)
LinkWindowCount ++;
else
LinkWindowCount = 0;
}
What would be the correct syntax for creating LinkWindow as an array or is
there a better way of accomplishing the same thing?
Thanks!
Comment