www.webdeveloper.com
Results 1 to 3 of 3

Thread: size of image in new window

  1. #1
    Join Date
    Dec 2004
    Posts
    2

    size of image in new window

    I am adding a picture to a dermatology website and also want to include a simple bit of javascript to open a new window with a real close-up of the bit of skin involved. The large version of the pic is too big to fit on the screen, so I just want to open a small window and let people scroll around to look at the bit they want.

    So this is what I wrote:

    <a href="xxx.jpg" onclick="window.open('xxx.jpg', 'window_name', 'width=400,height=400,resizable=yes,scrollbars=yes'); return false"><IMG border="0" alt="Click here to view a close up of this condition." src="xxx.jpg"></a>

    However the new window "intelligently" resizes xxx.jpg to fit in it, which completely misses the point. How can I make it leave the picture in its original size?? Please help! I'm using XP.

    Thanks
    Last edited by isisisis; 12-16-2004 at 09:05 AM.

  2. #2
    Join Date
    Jul 2003
    Location
    Wales
    Posts
    1,382
    You could access the image through the window name reference and then use that to change the image back to its original specifications.



    RyanJ
    Cheers,

    Ryan Jones.

  3. #3
    Join Date
    Dec 2004
    Posts
    2
    THanks, could you possibly post an example of how to do that - otherwise I think I'll probably just end up making new html pages for any examples I want to show this way.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles