CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2005
    Posts
    73

    Zoom functionality

    Hello,
    I have some pictures on my page that I want to add zooming functionality, that is, when a visitor clicks on an image, he will be able to zoom in and out on it.
    Any ideas on how this can be done?

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Re: Zoom functionality

    Have a look at this JavaScript link, you should find a lot of examples there :

    http://javascript.internet.com/image-effects/

  3. #3
    Join Date
    May 2002
    Posts
    10,943

    Re: Zoom functionality

    Hope you don't mind Hannes...

    Depending on what type of zooming capability you are talking about, this may be impossible. You can make images grow and shrink with the onmouseover and onmouseout events, but if you want zooming like the Google Maps double-click. That is not possible without other factors.

    EDIT: Added example below.
    Code:
    <image src="http://www.google.com/intl/en/images/logo.gif" id="img1" onmouseover="this.style.width='400px';this.style.height='300px'" onmouseout="this.style.width='200px';this.style.height='100px'">
    Last edited by PeejAvery; October 25th, 2006 at 05:07 PM.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  4. #4
    Join Date
    Mar 2004
    Location
    (Upper-) Austria
    Posts
    2,899

    Re: Zoom functionality

    Moved thread.
    I am not offering technical guidiance via email or IM
    Come on share your photo with us! CG members photo album!
    Use the Code Tags!

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured