I'm having problems finding an image script

He has: 6 posts

Joined: Aug 2004

Hey all, new guy here Laughing out loud I'm glad I found these forums, I've got lots to learn here!

So down to what I need, I'm trying to find a script, I'd imagine it will be java, to allow me to have a thumbnail link to the larger image, but to open in a new window that fits the size of the image. Then when you click the image it will close the window. I've seen it numerous places on the net before, in working order, but for some reason right now I can't find any examples...

Any and all help is greatly appreciated Shocked

KarenArt's picture

She has: 354 posts

Joined: May 2001

Are you talking about a pop-up window?
Remember, this may not work for a lot of people.

In the head section of your page:

&lt;script type="text/javascript"&gt;<!--
function popupwindow(url,name,wwidth,wheight) {
window.open(url,name,'width='+wwidth+',height='+wheight+',scrollbars=auto,status=no');
}
// -->
&lt;/script&gt;
'

On your thumbnails:

<a href="javascript:popupwindow('LINK to PAGE','000',WIDTH,HEIGHT);">
<img src="LINK to IMAGE" alt="" width="WIDTH" height="HEIGHT" border="0"></a>
'

On the bottom of the pop-up window:
<a href="javascript:window.close()"><b>Close this Window</b></a>'

PS: that doesn't close the window by clicking the image... it has a "Close this window" link. You can put the last javascript around your image to close it by clicking on the image, but you should add a note saying "click image to close this window". I think a simple "close this window" link might be less confusing.

gotta finish redesigning my sites so I can show them again.

The purpose of education is... to get more jokes!

He has: 6 posts

Joined: Aug 2004

Yea but not quite, see what I'm tryin to do here is make it so I don't have to make 250 seperate html files, each one for a picture. I've even seen some code where you mouse over the thumbnail and it shows a larger picture, but it moves with the mouse, etc etc it's sorta gay. But do you know if theres any way to tweak that code to work?

Like I said, I am le sucky at java lol

KarenArt's picture

She has: 354 posts

Joined: May 2001

Are you working off a database (php or asp) or html pages for your thumbnails?

KarenArt's picture

She has: 354 posts

Joined: May 2001

Take a look at this site http://www.crays.com/jsc/

Click on "Pop-up Windows and Pop-up Images" then "Pop-up Images". Maybe this is what you want?

gotta finish redesigning my sites so I can show them again.

The purpose of education is... to get more jokes!

He has: 6 posts

Joined: Aug 2004

Oh man that's perfectly what I'm looking for, I mean the only other thing would be a close script but you know what, fuggem lol, they can click the X

Thanks so much for the help Smiling

KarenArt's picture

She has: 354 posts

Joined: May 2001

Cool! Then you probably don't need the info below.

One last thing... I don't know the sites where a moused-over image follows your cursor (shudder).

I have a websites I'm making for another artist (ignore the design, it's sooooo far from being done).

This uses layers for the rollover so text can be included with the picture. http://cardinalart.com/JudiBarraza/artwork.php?gallery=horses

I also have a portfolio page http://cardinalart.com/Portfolio.shtml where I use links (which could just as easily be thumbnail images) to simply bring up a new picture.

Are either of those what you are speaking of?

PS: I'm really not trying to self promote here, just show examples. If this is too much I appologize.

gotta finish redesigning my sites so I can show them again.

The purpose of education is... to get more jokes!

He has: 6 posts

Joined: Aug 2004

No no no, by all means, the more the better. Like I said I'm here to learn, observe, etc. You can't ever have too much Smiling

Your linke to the horse gallery is along the lines of what I was talking about with the rollover images, it was weird though. It was almost like alternate text on a link or image, except instead of text it was an image and it was instant.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.