|
|
#1 (permalink) |
|
Registered User
Comfy Contributor
Joined in Feb 2006
Lives in Ohio
Hosted on SH93
119 posts
Gave thanks: 4
Thanked 0 times
|
Image Popup
Hi. I am working on an image gallery for a site. I want to make it so when you click on a image, it opens a popup containing the image with a 1/2 in border that is my sites bg color. I would also like to call it like example.com/image.php?image=dog.jpg . I have to do alot of images so I would like to just put it in the folder and when you request the url it checks the folder for the image and then displays it. Any ideas? I hope i didnt confuse you too much.
Attached is a screen shot of what I want the popup to look like. Thanks!
__________________
Last edited by BrennanU; August 31st, 2006 at 6:50 PM.. Reason: image didnt attach |
|
|
|
|
|
#3 (permalink) |
|
after g, before i
Resident.
Joined in Jul 2004
Lives in N,BC,CA
8,092 posts
Gave thanks: 48
Thanked 131 times
|
Your best bet is to use JavaScript. Unfortunately it's been about 2 years since I last dealt with creating windows (pop-ups). I can't remember how I handled dynamically sized images.. but if all of yours are the same, it'd be really easy to just center the image in the page and have some padding specified in your window width.
|
|
|
|
|
|
#4 (permalink) |
|
Registered User
Comfy Contributor
Joined in Feb 2006
Lives in Ohio
Hosted on SH93
119 posts
Gave thanks: 4
Thanked 0 times
|
I've never done any javascript so I couldnt do it. Anyone else know how I could do it. Also, how would I do the ?image=dog.jpg ?
__________________
|
|
|
|
|
|
#6 (permalink) |
|
Surpass Fan
On a golden path...
Joined in Oct 2005
Lives in Northern NJ
Hosted on PASS83
348 posts
Gave thanks: 7
Thanked 16 times
|
Is this something you will want to do more than once? There are multiple HTML generation programs that can help you make galleries...take a look at http://www.breezesys.com/
It is not just for Canon cameras and will work with JPG/TIF |
|
|
|
|
|
#7 (permalink) |
|
Surpass Fan
On a golden path...
Joined in Oct 2005
Lives in Northern NJ
Hosted on PASS83
348 posts
Gave thanks: 7
Thanked 16 times
|
Also, here is the code...
At the top of the HTML page add this: Code:
<script language="javascript">
function launch()
{
' I used variables here to set w, h, winleft and winup. These were passed by Breezebrowser from the image info
popup=window.open('imagename','popup title',"width=100,height=100,resizable=no,scrollbars=no,menubar=no,toolbar=no,status=no,location=no");
popup.resizeTo(w,h);
popup.moveTo(winleft,winup);
}
</script>
Code:
<a href="javascript:launch()"><img src="image name"> Last edited by sneagle; September 2nd, 2006 at 7:38 AM.. |
|
|
|
|
|
#8 (permalink) |
|
Registered User
Comfy Contributor
Joined in Feb 2006
Lives in Ohio
Hosted on SH93
119 posts
Gave thanks: 4
Thanked 0 times
|
Sorry for the slow response, I have been really busy with school. Sneagle: I looked at multiple gallery programs, and none of them really seemed to fit my needs. I finally just decided to make my own. I also tried that code and it didn't seem to work.
__________________
|
|
|
|
|
|
#9 (permalink) |
|
Surpass Fan
On a golden path...
Joined in Oct 2005
Lives in Northern NJ
Hosted on PASS83
348 posts
Gave thanks: 7
Thanked 16 times
|
Take a look at the example page (http://www.msj3.com/2005_giants_saints/) and look at the source code there. That will give you a better idea what file names to place where.
And, again, if this is something you will want to do, I recommend a program to generate the pages. Check out Breezebrowser...you can design your own templates--there are multiple examples included that you can modify. |
|
|
|