What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

pop up window


species

Member
Messages
18
Likes
0
hi, i was wondering how to add a small popup window to my site when a user clicks a link for an image. is it java that does this?
 
NO!!!!! I hate pop-ups! }P Thats why I have a pop-up blocker and everyone else should too.
Sry, don't how to do that.
 
i'll have to show you an example, its not an actual popup, instead of opening an image in new window. i want to open a small window with an image when a user clicks a thumbnail.
 
Pop-Up Window

Yes, the code for a pop-up window is JavaScript.? First you must create a page containing the image you want to link to.? Since you are making a photo gallery, you will use an image link.? First enter this code:

<script language="javascript" type="text/javascript">
//<!--
function popup()
{ window.open ("YourURLgoesHere.html","popup","width=400,height=400,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=1,toolbar=0") }
-->
</script>

I normally put this near the top of the source code where I can find it easily, but that is just my preference. :)? You should experiment with the width and height until you get the right size.

Once you have done that, enter this code where you want the link to be:

<a href="javascript:popup()"><img src="001.gif" border=0 width="40" height="40" alt="put the image description here"></a>

Change "popup" to what you want in the title bar of your new window.

Hope this helps!? I'm a little tired tonight, so if it doesn't work correctly please tell me so I can fix it tomorrow (when I am sane again). [honesty]
 

Back
Top