Click to See Complete Forum and Search --> : pop up window size issue
kerrysmagicshirt
01-27-2006, 12:36 PM
Hi there, you lovley lot.
Another painfully annoying - but probably really simple puzzle for youz to solve.
On my new site i will have thumbnails of my work - that when pressed will show the full sized image in a new window (common stuff) - how do i make that new window fit snug around the jpeg - rather than it being full size with the image in the corner?
I'm using DW 8 and really only work in design mode :D
Thanks
typographics
01-27-2006, 12:55 PM
kerry,
not sure about DW8, but with DWmx you simply add a behavior to the link. in the propery box, you have the option to open the content in a new browser window. then it will ask you to name the window, and there is an option to define how big the window will be. now, if you know how big your jpeg is, you simply set the window size to fit (leaving a couple of pixels on all sides for buffer room). again, not sure what the options are in DW8, but it should be similar. hope that helps.
matthew~
kerrysmagicshirt
01-27-2006, 01:38 PM
i can't see where i would be able to add a behavior?
i have link (where i have pout the root to the jpeg)
and target (_blank)
and low src - where it seems you need to add a file (no idea what this is to be honest)
sorry if i'm being a total spazzmo
typographics
01-27-2006, 01:49 PM
kerry,
no problem. you should have a behaviors palette. if not, go up to view on the top of the screen and choose "behaviors". in the behaviors toolbox, it should have a little plus sign. when you click on it, it will give you options. in those options should be "open in new browser". now, again, i use dreamweaver mx, so im not sure what the older versions have and dont have. i suppose its possible that isnt an option in DW8.
matthew~
kerrysmagicshirt
01-27-2006, 06:44 PM
Cheers dude - i'll check it out ;)
reuber1
01-27-2006, 07:54 PM
I don't know if this will help you, but this was posted yesterday on a different thread.
www.huddletogether.com/projects/lightbox
kerrysmagicshirt
01-30-2006, 11:32 AM
wow - that's great Reuber thanks - i'll have to stick with the basics for now though i think - but the lighbox tutorial is bookmarked for when i feel a little more daring.
I've managed to get it to work via the behaviors pallet which is great. I added 5pixles to both the height and width but it has not centred the pic! - i can't see how to change this!
Ryan8720
01-30-2006, 08:52 PM
You have to use JavaScript to resize the window. The following makes a popup that is 400 x 400 with no statusbar, no menu, no scrollbars, no location bar, and is not resizeable. Change the value to 1 if you want to turn one of those on. left and top specify how far from the top left corner of the browser the window will be placed.
<script type="text/javascript">
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men ubar=0,resizable=0,width=400,height=400,left = 312,top = 184');");
}
</script>
<a href="javascript:popUp('thumbnail.html')">Open Thumbnail</a>