|
|
#1 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Feb 2007
Lives in the Netherlands
9 posts
Gave thanks: 0
Thanked 0 times
|
javascript pop up
I know how to make a pop up window in javascript, but now I want an image pop-up. It should automatically have the size of the image. (it's for a gallery and it's too much work to type in the sizes for every image).
For example like this: But this one you have to fill in the size yourself... http://www.javascriptkit.com/script/...opimage2.shtml Does someone know a good code for this? thanks! |
|
|
|
|
|
#2 (permalink) |
|
after g, before i
Resident.
Joined in Jul 2004
Lives in N,BC,CA
8,033 posts
Gave thanks: 48
Thanked 129 times
|
You could either use a serverside language (eg: php) to pass the image dimensions or use javascript to determine the image size and resize the window. Either works, but the javascript implementation can act weird in tabbed browsing instances.
|
|
|
|
|
|
#3 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Feb 2007
Lives in the Netherlands
9 posts
Gave thanks: 0
Thanked 0 times
|
hm... I'm really bad with php.
And usability is important for as much browsers as possible. Maybe I should type the dimensions myself... thanks! |
|
|
|
|
|
#4 (permalink) |
|
Surpass Fan
On a golden path...
Joined in Oct 2005
Lives in Northern NJ
Hosted on PASS83
332 posts
Gave thanks: 6
Thanked 16 times
|
I use a program called Breezebrowser to make galleries. It uses templates to create the html files. It will pass along the width/height of the picture. The templates are pretty easy to modify if you know html. I am not sure if that is helpful or not.
|
|
|
|
|
|
#5 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Feb 2007
Lives in the Netherlands
9 posts
Gave thanks: 0
Thanked 0 times
|
thanks! I don't like templates very much (I know too much about html and css for that), but I will try if I can modify it to make it look the way I want. And else I can maybe steal the javascript code he uses to make the pop-up, lol.
thanks ![]() |
|
|
|
|
|
#6 (permalink) |
|
Race Surpass
Super #1
Joined in Jul 2006
Lives in Oklahoma City, OK
Hosted on sh102
1,218 posts
Gave thanks: 18
Thanked 86 times
|
You can have a look at my photo albums for an example. http://www.markheadrick.com/images/MyPics/mypics.shtml
It uses JavaScript to toss a popup window in the dimension of the image. You just click on the image somewhere on the popup to close. I use CD2HTML with a modified template to generate the pages. Perhaps you or someone else will find it helpful. ![]()
__________________
|
|
|
|
|
|
#7 (permalink) |
|
muffins
Excelling Contributor
Joined in Mar 2006
Lives in Chicago, IL
Hosted on NONE
644 posts
Gave thanks: 26
Thanked 34 times
|
Actually, why not use Lightbox?
http://www.huddletogether.com/projects/lightbox/ You won't have to worry about new windows for pictures, and it's also very aesthetically pleasing. I use it myself when I want to post thumbnails, but yet still display their full size. |
|
|
|
| This user thanks jordanriane for this great post! | MarkRH (February 18th, 2007) |
|
|
#8 (permalink) | |
|
﴾͡๏̯͡๏﴿...tweet
Super #1
Joined in Dec 2005
5,754 posts
Gave thanks: 145
Thanked 151 times
|
Quote:
__________________
poof
|
|
|
|
|
|
|
#9 (permalink) |
|
Race Surpass
Super #1
Joined in Jul 2006
Lives in Oklahoma City, OK
Hosted on sh102
1,218 posts
Gave thanks: 18
Thanked 86 times
|
Oooo... I like that lightbox script.
Think I will use that with my albums. Will just need to modify my CD2HTML template. ![]()
__________________
|
|
|
|