Jump to content

Screenshot Windows?


barkera

Recommended Posts

Hi,Only a lot of sites you see some thumbnails and when you click on them it opens a new window with a larger version of the picture in the new window. How do you do that? I don't mean just create a new page and open it up, but just a small window that is the same size as the [picture. Is there anyway to do it like that or will I have to create a new page for each picture?Thanks.

Link to comment
Share on other sites

So you want a JavaScript pop-up window the same size as the picture?Not just something like *click* (when clicked on open picture in a new window)Ok, I'll post a code for you, but give me a few minutes I gotta go do something.I'll be back here shortly with the code

Link to comment
Share on other sites

<html><head><script type='text/javascript'>function image1(){window.open('bigimage.gif','Image','width=300,height=120,resizable=no,scrollbars=no,');}</script></head><body><a href='javascript:image1();'><img src='imagethumbnail.gif' alt='' /></a></body></html>

Make sure to add a new line of JS code for each imageexample:function image1(){window.open('bigimage1.gif','Image','width=300,height=120,resizable=no,scrollbars=no,');}function image2(){window.open('bigimage2.gif','Image','width=500,height=300,resizable=no,scrollbars=no,');}function image3(){window.open('bigimage3.gif','Image','width=150,height=200,resizable=no,scrollbars=no,');}Set the height and width for each image and call them like this:<a href='java script:image1();'>Edit: I forgot the SCRIPT tags before, added now :)

Link to comment
Share on other sites

Oh crap, sorry about that<script type='text/javascript'>function image1(){window.open('bigimage1.gif','Image','width=300,height=120,resizable=no,scrollbars=no,');}</script>I forgot to type up the SCRIPT tags :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...