Click to See Complete Forum and Search --> : Opening images in a predefined sized window


Dark Dragon
08-31-2003, 08:00 PM
Okay..here is one of the difficulties I face...I have some images I wish to have open in a separate window however the window I want it to appear in will already have its size predetermined..here is the window resize code I am gonna use:

<html>
<head>

<script type="text/javascript">
function openwindow()
{
window.open("http://www.w3schools.com","my_new_window","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width=400, height=400")
}
</script>

</head>
<body>

<form>
<input type="button"
value="Open Window"
onclick="openwindow()">
</form>

</body>
</html>

I left the original link as it is because I am unsure as to what I put in that area...do I put a img src tag where the URL is or what? I tried using DreamWeaver tools but I haven't found what I needed. Thanks

Jupac
08-31-2003, 08:04 PM
so u want a link that shows a closeup "biger" of the picture?

Dark Dragon
08-31-2003, 08:07 PM
Nope..What I want to do is, when a visitor clicks on the name of one of my images, the image opens up in a new window BUT the new windows size is already pre-determeined...so instead of a full screen window..you have a window that is maybe 400 x 400 or something.

Jupac
08-31-2003, 08:16 PM
u olny wat 1?
<input type="button" onclick="window.open("locationofhtm","name",config="height=400,width=400,resizable=0,scrollbars=1,status=0,top=0,left=0,screenx=0,
screeny=0,toolbar=0,menubar=0,location=0");>

Dark Dragon
08-31-2003, 08:21 PM
Thanks Lakers..I am gonna try it out..however I have a few images..not too much yet.

Dark Dragon
08-31-2003, 08:31 PM
Okay..I am having trouble getting it to work...where you have ("locationofhtm","name"...

well...the imgs are in a separate folder...so I put "pics" because it is the name of the img folder and I put the name of one of the pics where it says "name" in your code....but when I tested it..it won't work..I may be dense or something but I don't get it

Jupac
08-31-2003, 08:36 PM
/pics/pic1.gif

Dark Dragon
08-31-2003, 08:38 PM
I will try it..thanks!

Okay..this is what I have now..

<input type="button" onclick="window.open("pics/oldwaltz2",config=" height=400,width=400,resizable=0,scrollbars=1,stat
us=0,top=0,left=0,screenx=0,
screeny=0,toolbar=0,menubar=0,location=0"); value="Pic #1" name="pic1">

So I am doing something really stupid here..is this JavaScript? Because if it is then I may know why it won't work

Jupac
08-31-2003, 08:48 PM
yep it is JS

Dark Dragon
08-31-2003, 08:50 PM
Okay..I am gonna try something..be right back...

Okay..I am back..I deactivated my AdBlocker then tried it but it still won't work..thanks for your help Lakers but I think I may have to try something else..especially if others, like myself, have an AdBlocker running...once again, thanks for taking the time to help! :D

Jupac
08-31-2003, 09:22 PM
ok np