Forum Moderators: open

Message Too Old, No Replies

customize pop up window sizes

         

cdell100

6:39 pm on Aug 12, 2002 (gmt 0)

10+ Year Member



If I'm bulding a page (in dreamweaver) with nine thumbnails whose corresponding pop up images are all different sizes, is there a way to customize each pop up window so that there is little or no border around the pictures...right now i'm using a piece of javascript code in the <head> that stipulates one size pop up window for all of the images...

dabrisz

7:16 pm on Aug 12, 2002 (gmt 0)

10+ Year Member



I am no javascript expert but I believe this should work. Let me know.

html
<a href="javascript:open_window(2)">link</a>

Javascipt

<!--
function open_window(num)
{
if (num == 1)
{window.open("sample1.html", "window name", config="width=250,height=202,scrollbars=no,menubar=no,toolbar=no,resizable=no")}
else if (num == 2)
{window.open("sample2.html", "window name", config="width=250,height=182,scrollbars=no,menubar=no,toolbar=no,resizable=no")}
else if (num == 3)
{window.open("sample3.html", "window name", config="width=250,height=182,scrollbars=no,menubar=no,toolbar=no,resizable=no")}
}
//-->

moonbiter

7:30 pm on Aug 12, 2002 (gmt 0)

10+ Year Member



You can simplify this even more:

function openWindow(url, width, height) {
window.open(url, 'window name', 'width=' + width + ',height=' + height + ',scrollbars=no,toolbars=no,resizable=no');
}

You would pass the width and height along inline with the function call.