logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > Javascript and JS frameworks
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 03-10-2008, 02:53 PM   #1
dazzclub
dazzclub's Avatar
 
Join Date: Jul 2005
Location: Hull / Chester
Posts: 141
Default click image for a closer look

hi guys and girls,

I have a javascript that is pretty simple. I have an image and above it, a link "Click here for a closer look". When the user presses it, a new window pops up with the image inside.

My probelms is that the images are being retrieved from my database, all shapes and sizes, so i cant really specify a height and width. Is there a way of making the window adjust to the size of the image instead??

here is my javascript;
-------------

function popitup(url) {
newwindow=window.open(url,'name','height=0,width=0 ');
if (window.focus) {newwindow.focus()}
return false;
}



kind regards
Darren
dazzclub is offline   Reply With Quote
Old 03-10-2008, 08:43 PM   #2
d a v e
 
Join Date: Feb 2006
Location: finland
Posts: 1,684
Default

how about something like this
http://www.huddletogether.com/projects/lightbox2/ ?
d a v e is offline   Reply With Quote
Old 03-10-2008, 09:42 PM   #3
dazzclub
dazzclub's Avatar
 
Join Date: Jul 2005
Location: Hull / Chester
Posts: 141
Default

Hi Dave,

I'm seeing this everywhere, and it's kinda like "oh not again".

Saying that, i am a huge fan of it and i have used it on some of my projects.

I think i may have to use this.

kind regards
Dazzclub
dazzclub is offline   Reply With Quote
Old 03-11-2008, 12:11 PM   #4
d a v e
 
Join Date: Feb 2006
Location: finland
Posts: 1,684
Default

i think there's a couple of variations lik graybox (greybox?) thickbox etc. also you can change the stylesheet and make it look a bit different, even change the colour of the overlay too

yeah it is quite popular but it's also easy and works well.
d a v e is offline   Reply With Quote
Old 03-19-2008, 05:04 PM   #5
m1a2x3x7
m1a2x3x7's Avatar
 
Join Date: Mar 2007
Posts: 297
Default

I had an issue like yours. I set my database up like this for the images.

id | image | width | height

set variables for the width and height and when you click that image have the variables in-place of of the width and height of the java script.
__________________
Chris Schultz
Web and Multimedia Designer
Schultz|Studio
m1a2x3x7 is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:09 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com