Go Back   PCMech Forums > Help & Discussion > Internet, Web Applications, & The Cloud

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 01-21-2003, 06:51 PM   #1
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,382
looking for a script

I'm looking for a javascript for a webpage with numerous thumbnail images. I want it so whan you slick on a thumbnail, the large version of the picture pops-up in a new window, forming around the image.

For example: I have a 300 x 300 image, and I don't want it to take up a whole page. I want it to pop-up in a new window because then you wouldn't have to wait for all 101 thumbnails to load again, like you would went clicking "back".

I know this works, I've seen it done before, but I can't find any sites that have it now that I'm looking for it. Thanks
__________________
There are two secrets to staying young, being happy, and achieving success. You have to laugh and find humor every day, and you have to have a dream.
Force Flow is offline   Reply With Quote
Old 01-21-2003, 07:22 PM   #2
Member (13 bit)
 
DrZaius's Avatar
 
Join Date: Jul 2000
Location: Fullerton, CA
Posts: 7,030
Check this thread, I wrote a script that does just that.
DrZaius is offline   Reply With Quote
Old 01-21-2003, 07:37 PM   #3
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,382
Thanks, DrZaius!

Now, how can I do multiple pop-ups? Do I need a seperate script for each one?
Force Flow is offline   Reply With Quote
Old 01-21-2003, 07:44 PM   #4
Member (13 bit)
 
DrZaius's Avatar
 
Join Date: Jul 2000
Location: Fullerton, CA
Posts: 7,030
You only need to put that main script at the top of the HTML file once, then each time you call it use that link code and replace "mypic.jpg" with the name of the image.
DrZaius is offline   Reply With Quote
Old 01-21-2003, 07:53 PM   #5
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,382
Ah. Okay. I got that working.

Now, about the "close window" thing.
You said to add...
Quote:
picWin.document.write('
Close Window
');
...after
Quote:
picWin.document.write('');
When I plugged it in, all it did was change the page in the pop-up window to show the "page cannot be found" error. Am I doing something wrong?
Force Flow is offline   Reply With Quote
Old 01-21-2003, 07:56 PM   #6
Member (13 bit)
 
DrZaius's Avatar
 
Join Date: Jul 2000
Location: Fullerton, CA
Posts: 7,030
"javascript" should be one word not two in the link to close the window, the forums seems to keep splitting it into two words when I type it.
DrZaius is offline   Reply With Quote
Old 01-21-2003, 08:00 PM   #7
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,382
Ooo! Ooo! It works!! Thanks a lot, DrZaius! This will save me a lot of time!
Force Flow is offline   Reply With Quote
Old 01-21-2003, 08:01 PM   #8
Member (13 bit)
 
DrZaius's Avatar
 
Join Date: Jul 2000
Location: Fullerton, CA
Posts: 7,030
Glad it helped.
DrZaius is offline   Reply With Quote
Old 01-21-2003, 09:41 PM   #9
Staff
Premium Member
 
mairving's Avatar
 
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
I usually do it a little simpler than that. The code is shorter but there is no close link. I also use a focus to pop the picture to the front.

Code:
In Head
function newWindow(about) {
    
   aboutWindow = window.open(about , 'aboutwin', 'toolbar=no, location=yes, scrollbars=no, resizable=no, width=640,height=480')
   
   aboutWindow.focus()
    
}
In body
<a  href="javascript:newWindow('image.jpg')"><img src="thumbimage.jpg" alt="="0"></a>
__________________

Want to Make $$$$ with your Computer? No Risk! Simply press shift-4 four times in a row
mairving is offline   Reply With Quote
Old 01-21-2003, 11:41 PM   #10
Member (9 bit)
 
Join Date: Apr 1999
Location: North Bay, Ont., Canada
Posts: 475
Send a message via Yahoo to Eaglefeather
Force I made a reply to your post, or at least I thought I had. While I was reading this thread I clicked on Dr Zaius's link and forgot to come back.

So it looks like my reply is on the thread, "Black Background". I think you will probably be very interested in the two links I provided. Lots of good scripts available.
__________________
Cheers
Eaglefeather

My favourite hobby, it seems to me,
Is crashing my PC.
Eaglefeather is offline   Reply With Quote
Old 01-22-2003, 06:56 AM   #11
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,382
Marvin, what is this focus option do?
Force Flow is offline   Reply With Quote
Old 01-22-2003, 07:10 AM   #12
Staff
Premium Member
 
mairving's Avatar
 
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
The focus just makes sure that the window is always on top of any other windows.
mairving is offline   Reply With Quote
Old 01-22-2003, 07:41 PM   #13
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,382
Okay. Thanks guys!

Eaglefeather, those links are interesting. I'm sure I'll reference them often.
Force Flow is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes 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 not edit your posts

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



All times are GMT -5. The time now is 04:13 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2