JavaScript
  Home arrow JavaScript arrow Working with Multiple Graphics for a Zoom ...
IBM Developerworks
Web Buyers Guide
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Download TestComplete 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

Working with Multiple Graphics for a Zoom Application in JavaScript
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2008-03-18

    Table of Contents:
  • Working with Multiple Graphics for a Zoom Application in JavaScript
  • Listing the source code of the previous zooming application
  • Zooming into and out of multiple images
  • Completing the improved image zooming application

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    Iron Speed
     
    ADVERTISEMENT

    Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    Working with Multiple Graphics for a Zoom Application in JavaScript
    (Page 1 of 4 )

    Welcome to the third installment of the series "Zooming out images with JavaScript." This set of educational tutorials guide you through the process of developing a highly modular JavaScript application that has the capacity to perform basic zoom in/out effects on a certain number of bit-mapped images previously included in a web document.

    JavaScript is widely used by both novice and experienced web developers to extend the behavior of several web applications that were built originally by way of a server-side programming language. In terms of expanding the functionality of a given web application, zooming into and out of bit-mapped images is one of the easiest to learn and code among the numerous visual effects that are usually implemented via client-side scripting.

    If you already went through the preceding article of this series, then it's quite probable that zooming into and out of bit-mapped images using JavaScript is now a familiar process for you. The procedure requires only a minimal background in the most common methods provided by the DOM (short for Document Object Model) and an intermediate level of knowledge about (X)HTML and CSS styles.

    Basically, the approach that I followed in the previous tutorial to achieve realistic zoom in/out effects on a given image, was based on enlarging (or reducing, when applicable) the respective "width" and "height" attributes of the targeted image via some simple client-side scripting, in this way achieving the zooming effect.

    As you may notice, this technique is rather simple, but the ease by which it's implemented in any web site along with its more than acceptable results makes it ideal for building a "quick and dirty" zooming application.

    Besides, during the previous tutorial I developed a basic script that was capable of zooming into and out of a selected image by utilizing a pair of common web form buttons. However, regardless of the fact that this zooming script was quite useful for applying this visual effect to any bit-mapped graphic, the truth is that it lacked some important features, like the capacity to work with multiple images. Not too good, is it?

    So, bearing in mind that any decent zooming application should be capable of targeting several images in a given web page, over the course of this third article of the series I'm going to introduce some important modifications to the script that you learned previously. This way it can zoom into and out of multiple graphics at the same time.

    All right, now that you know the subject that will be covered in this tutorial, it's time to learn how to modify the original JavaScript zooming application to provide it with the ability to work with several images in a web page. Let's get going!

    More JavaScript Articles
    More By Alejandro Gervasio


       · Over the course of this third chapter of the series, the functionality of the...
     

    JAVASCRIPT ARTICLES

    - A Closer Look at Smart Markers with Yahoo! M...
    - Using Polylines and Smart Markers with Yahoo...
    - Bulleted Menu of Links
    - Creating Click Loggers and Basic Markers wit...
    - Adding Pan Controls to Yahoo! Maps
    - Adding Zoom Controls to Yahoo! Maps
    - Working with Yahoo! Maps
    - Building Image Zooming Controls with the DOM...
    - Working with Multiple Graphics for a Zoom Ap...
    - Improving an Image Zooming Application with ...
    - Zooming in on Images with JavaScript
    - JavaScript Date Objects: Universal Coordinat...
    - Javascript Objects: More Date Methods
    - JavaScript Objects: Dates
    - JavaScript Objects: Finishing Strings

    Iron Speed





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway