HTML
  Home arrow HTML arrow Page 2 - Handling Images in a 3D Table Image Galler...
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  
Mobile Linux 
App Generation ROI 
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? 
HTML

Handling Images in a 3D Table Image Gallery
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2009-02-09

    Table of Contents:
  • Handling Images in a 3D Table Image Gallery
  • Functions
  • Image Resolution
  • Automatically Changing Images in a 3D HTML Table Gallery
  • Operation from the Programmer’s Point of View

  • 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
     
     
    ADVERTISEMENT


    Handling Images in a 3D Table Image Gallery - Functions


    (Page 2 of 5 )


    The maximizeFn(ID) function

    This is the “maximizeFn(ID)” function:


    function maximizeFn(ID)

    {

    document.getElementById(ID).style.position="absolute";

    document.getElementById(ID).style.zIndex="2";

    document.getElementById(ID).style.width="400";

    document.getElementById(ID).style.height="400";

    document.getElementById(ID).title="Click to Restore";

    maximized = true;

    }


    In our example, the restored image size is 100px X 100px, while the maximized image size is 400px X 400px.

    When the maximizeFn(ID) function is called, it gives the image the CSS absolute position property. Next, it gives the image a CSS z-index value of 2. Then it gives the new width, and then the new height of the image. These are the dimensions when maximized (400px X 400px).

    After it does this, it changes the title attribute of the image to (Click to Restore). While the image is maximized, if your mouse pointer goes over it, a tool tip should indicate “Click to Restore.” When the image is maximized, it can only be restored. So the function sets the maximized variable to true. When next the maxRest(ID) is called, it will use the maximized value of true to call the “restoreFn(ID)” function.

    The restoreFn(ID) function

    This is the “restoreFn(ID) function:


    function restoreFn(ID)

    {

    document.getElementById(ID).style.position="relative";

    document.getElementById(ID).style.zIndex="1";

    document.getElementById(ID).style.width="100";

    document.getElementById(ID).style.height="100";

    document.getElementById(ID).title="Click to Maximize";

    maximized = false;

    }


    When the restoreFn(ID)function is called, it gives the image the CSS relative position property. Next it gives the image a CSS z-index value of 1. After that, it gives the old width and then the old height of the image. These are the dimensions when restored (100px X 100px). It then changes the title attribute of the image to (Click to Maximize). While the image is restored, if your mouse pointer goes over it a tool tip should indicate “Click to Maximize.” When the image is restored, it can only be maximized. So the function sets the maximized variable to false. When the maxRest(ID) is next called, it will use the maximized value of false to call the “maximizeFn(ID)” function.

    All of the functions use the ID of the image in their execution.

    More HTML Articles
    More By Chrysanthus Forcha


     

    HTML ARTICLES

    - Comparing Browser Response to Active Client ...
    - Testing Browser Response to Active Client Pa...
    - Active Client Pages: Completing the Code for...
    - ACP and Browsers: Setting up an Example
    - How Browsers Respond to Active Client Pages
    - Completing a Tree with Active Client Pages
    - HTML Form Verification and ACP
    - Building an ACP Tree
    - Completing an ACP 3D HTML Table Image Gallery
    - Building an ACP 3D HTML Table Image Gallery
    - A Multiple Page Image Gallery with Active Cl...
    - Building an Image Gallery with Active Client...
    - Concluding a Menu for All Browsers
    - A Vertical Menu for All Browsers
    - Downloading Long HTML Pages with ACP







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek