Dark Dragon
09-01-2003, 08:05 AM
Okay...I got a hold of a good code which allows an image, when its link is clicked, to appear in a new but size controlled window...works nicely...for one image. Here is the code I am using:
<html>
<head>
<script type="text/javascript">
function openwindow()
{
window.open("pics/elderman","my_new_window","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=yes, width=400, height=400")
}
</script>
</head>
<body>
<form>
<input type="button"
value="Open Window"
onclick="openwindow()">
</form>
</body>
</html>
So I repeat the code and have it link to another image..I even edited out any extra Form tags and when I tested it, I thought it was working only to find that not only did the second button link to my second image but the first button linked to my second image too.
I tried separating the codes using a tablebut no go...I tried using part of the code, the "window.open part...still nothing. So I do not know what I did wrong...secondly how do I center my images in the windows?...Thanks
<html>
<head>
<script type="text/javascript">
function openwindow()
{
window.open("pics/elderman","my_new_window","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=yes, width=400, height=400")
}
</script>
</head>
<body>
<form>
<input type="button"
value="Open Window"
onclick="openwindow()">
</form>
</body>
</html>
So I repeat the code and have it link to another image..I even edited out any extra Form tags and when I tested it, I thought it was working only to find that not only did the second button link to my second image but the first button linked to my second image too.
I tried separating the codes using a tablebut no go...I tried using part of the code, the "window.open part...still nothing. So I do not know what I did wrong...secondly how do I center my images in the windows?...Thanks