So, I have this script to open popup window with a specified size:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=1,width=800,height=600,left = 10,top = 10');");
}
// End -->
</script>
So this open a page of 800x600 but what if I also want another link (in the same html page) to open a different sized window...
there must be more to your question than i am understanding. but . . . in your example you say you want another link to open another size window. then have the other link call another function (for example popUp2) with a different size window. you can have as many functions as you want. each link can point to a different function.
if you are asking how to dynamically change that single window open function with different window sizes, then you would need to define a variable with the size you want and replace the actuial values in your statement with the variables.
Thanks Beach Bum,
sorry if I wasn't clear enough, but you answered my question.
I didn't know you could call a funcion popUp2, popUp3, etc.
This really help.
Bookmarks