View Full Version : Popups
jcoates
10-10-02, 09:59 PM
Can anyone tell me how to get my thumbnail images to "popup" rather than just open another window?
Thanks
You can do various things with javascript.
You can create a frames site and have thumbs inside one part of the frameset and the target be another.
You can use a prewritten (free) CGI-perl gallery script or one written in PHP.
There are so many options open to you it is impossible to list them all. A lot has to do with what you are trying to do and what you want it to look like.
Hope this helps get you started, anyway
Dale
Bad Hair Day
10-11-02, 04:34 AM
Originally posted by jcoates
Can anyone tell me how to get my thumbnail images to "popup" rather than just open another window?
Thanks
http://www.ornj.net/software/webalbum/index.html
And - It's FREE!
BHD
Heres some Hot Cofffe For ya!
Copy and pase this script into your pages with the thumbnails.
<!-- Java Open Window
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '"
+ id "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,men ubar=0, resizable=0,width=500,height=600');");
}
// End -->
</script>
<A HREF="javascript:popUp('http://www.mydomain.com/imagedirectory/imagebigfile.pic')">
<img SRC="/imagedirectory/imagethumbfile.pic"></A>
Edit the link according to the desired file. Link can be used as many times as needed with one occurance of the Java script.
In the window properties.
Toolbar, scrollbar, Etc.. 0=off 1=on set to your desire..
Window hieight, width, Ect. all adjustable to desired size.
To Close the Window
Paste into the popup window code..
<a href="javascript:window.close();">Close Window</a>
Simple but effective.. You can even use this script to call a new page. Then you can design the page that the image is called on. Or just popup the image itself.. Hope this helps..
Bad Hair Day
10-11-02, 05:42 AM
Originally posted by davros
Heres some Hot Cofffe For ya!
Copy and pase this script into your pages with the thumbnails.
[code]
<!-- Java Open Window
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '"
+ id "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,men ubar=0, resizable=0,width=500,height=600');");
}
// End -->
</script>
Isn't that script going to open the picture in a new window?
BHD
Yeah it will.. I realized thats not what he wanted too late though.. I guess that's what I get for speed reading the request.. LOL
..... target="_blank" .....
jcoates
10-11-02, 01:45 PM
Originally posted by Bad Hair Day
Isn't that script going to open the picture in a new window?
BHD
Well the new window is OK. A popup window, not a full browser window. Which is this?
Bad Hair Day
10-11-02, 08:51 PM
Originally posted by davros
Yeah it will.. I realized thats not what he wanted too late though.. I guess that's what I get for speed reading the request.. LOL
(Tongue in cheek)
I remember my 'Old feller' pulling me to one side when I was around 16 years old, and whispering to me...........
You will only get either one or both of two problems from rushing things - A heart attack/A large family.
So far, I got none of the first, and two kids - Just like him.
;)
BHD
The script above will open a new window..
but you can set the size of the window by adjusting the height and width.. and turn off all of the garb so it's nothing more than a picture frame.. Beats having an etire browser window open..
Bad Hair Day
10-11-02, 09:04 PM
Originally posted by JGross
..... target="_blank" .....
Doesn't that open a NEW WINDOW too?
:rolleyes:
BHD
I'm really just getting around to needing this, and as usual, I'm having a problem.
What I'd like to have happen is when a visitor clicks on a thumbnail, a window would open with just the image. No scroll bar, no menubar. Nothing. Just a window with the image in it.
I'm using FP2000.
Any help would be greatly appreciated.
Thx.
MinDBenNdER
6-17-03, 06:25 PM
I don't know if this will help you jcoates, but I got this .js file that has some script that will make a drag-able image window pop up with in the existing browser window.
I don't know if the site is still up (it has been down for a wile) but you can see an example of this on www.cpixel.com (http://www.cpixel.com). It's just a "Hot or Not" type site for you to post pictures and stuff.
I haven't used the code yet, but feel free to put it into use if you want.
<A HREF="javascript:void(0)" ONCLICK="open('your URL.html','miniwin','toolbar=0, location=0,directories=0, status=0,menubar=0, scrollbars=0,resizable=0, width=200,height=200')"> Your Link Text or Image.</A>
JGross:
That's exactly what I'm trying to do. Now, do I have to include this for every image? Also, is there a way to make the window automatically/dynamically assume the size of the image that is being displayed?
I really appreciate the help.
if your using php or something for the images then it would be easy to dynamically set it to automatically fit, it would also be easy for you to repeat that code easily, however if your doing it in html you may have to do it the hard way.
youll most likely need to type it out
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.