soulflycrx
11-30-2002, 11:47 AM
I can't get this script to work...well, at least some of it.
I want to have a link to open an image in a pop-up style window. I want the window to be the exact same size as my photo. (IE. My image is 200x400, so I want the window to have the same viewing dimensions)
Here is the script. What is wrong? When I click my link, it DOES bring up a new window with my photograph in it, BUT the new window is not the same size as the photo. The new window is way to big.
<script language="javascript">
function popUp(filename,imageWidth,imageHeight) {
newWin =
window.open(filename,"myPic","width=imageWidth,height=ImageHeight,menubars=no,scrollbars=no,statusbar=no,locationbar=no");
}
</script>
and in the body...
click me (javascriptopUp('image.jpg',50,100);)
I want to have a link to open an image in a pop-up style window. I want the window to be the exact same size as my photo. (IE. My image is 200x400, so I want the window to have the same viewing dimensions)
Here is the script. What is wrong? When I click my link, it DOES bring up a new window with my photograph in it, BUT the new window is not the same size as the photo. The new window is way to big.
<script language="javascript">
function popUp(filename,imageWidth,imageHeight) {
newWin =
window.open(filename,"myPic","width=imageWidth,height=ImageHeight,menubars=no,scrollbars=no,statusbar=no,locationbar=no");
}
</script>
and in the body...
click me (javascriptopUp('image.jpg',50,100);)