icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.
Old February 17th, 2007, 4:43 PM   #1 (permalink)
Registered User
Fresh Surpasser
 
nancy_kelpie's Avatar
 
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!
nancy_kelpie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 17th, 2007, 4:57 PM   #2 (permalink)
H
after g, before i
Resident.
 
H's Avatar
 
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.
H is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 17th, 2007, 5:07 PM   #3 (permalink)
Registered User
Fresh Surpasser
 
nancy_kelpie's Avatar
 
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!
nancy_kelpie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 17th, 2007, 5:16 PM   #4 (permalink)
Surpass Fan
On a golden path...
 
sneagle's Avatar
 
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.
__________________
www.msj3.comSPACERReseller - PASS83
SPACER
sneagle is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 17th, 2007, 6:52 PM   #5 (permalink)
Registered User
Fresh Surpasser
 
nancy_kelpie's Avatar
 
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
nancy_kelpie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 18th, 2007, 1:13 AM   #6 (permalink)
Race Surpass
Super #1
 
MarkRH's Avatar
 
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.
MarkRH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 18th, 2007, 8:25 AM   #7 (permalink)
muffins
Excelling Contributor
 
jordanriane's Avatar
 
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.
__________________
{o,o} O RLY? atourworst.org - mywhmcs.com
|)__)
-"-"-
jordanriane is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
This user thanks jordanriane for this great post!
MarkRH (February 18th, 2007)
Old February 18th, 2007, 8:48 AM   #8 (permalink)
﴾͡๏̯͡๏﴿...tweet
Super #1
 
Joined in Dec 2005
5,754 posts
Gave thanks: 145
Thanked 151 times
Quote:
Originally Posted by jordanriane View Post
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.
like OMG yeah.
__________________
poof
Brandonnn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 18th, 2007, 10:08 AM   #9 (permalink)
Race Surpass
Super #1
 
MarkRH's Avatar
 
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.
MarkRH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On