Forum Moderators: open

Message Too Old, No Replies

Thumbnail - picture to show in new window

         

a_angova

7:29 am on Aug 10, 2005 (gmt 0)

10+ Year Member



Hello,

I have a gallery on a site and I want to add thumbnails on it.

The current version of this is:
<a href="#" onClick="window.open('img/DJ-rebekah.jpg', '_blank', 'width=420, height=525, left=100,top=100,scrollbars=no');"><img src="img/DJ-rebekah-teasdale.jpg" alt="" class="image_bikini"/></a>

But when a person, viewing the site, has the javascript disabled, this will not work. Can you please tell me another way of opening picture from the gallery in new window in bigger size. I will apppreciate it very much.

Best regards, Ani

BlobFisk

9:36 am on Aug 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi a_angova and welcome to WebmasterWorld!

You can specify a link in your href and override it with return false:

<a href="imagePage.html" target="_blank" onClick="window.open('img/DJ-rebekah.jpg', '_blank', 'width=420, height=525, left=100,top=100,scrollbars=no');return false"><img src="img/DJ-rebekah-teasdale.jpg" alt="" class="image_bikini"/></a>

This tells the browser to ignore the default behaviour and use the javascript function instead.

HTH

a_angova

10:24 am on Aug 10, 2005 (gmt 0)

10+ Year Member



Thank you BlobFisk for the answer.

Do you know another way to open a picture in a new window without using javascript, articles on this topic or examples will be of great help for me.

Best Regards, Ani

innocbystr

3:22 pm on Aug 10, 2005 (gmt 0)

10+ Year Member



<a href="picture2.jpg" target="_blank">
<img src="picture1.jpg" width="XXX" height="XXX" alt="picture" /></a>

a_angova

6:25 am on Aug 11, 2005 (gmt 0)

10+ Year Member



Thank you all, I used the first way to solve the problem because the customer want it like that.

Best Regards to All and Thank you again, Ani

a_angova

6:37 am on Sep 7, 2005 (gmt 0)

10+ Year Member



Hello all,

Thank you very much for helping me again.

I managed to create the desired functionality.

Best Regards, Ani

<Sorry, no personal URLs.
See Terms of Service [webmasterworld.com]>

[edited by: tedster at 8:32 am (utc) on Sep. 7, 2005]