HTML
  Home arrow HTML arrow 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


    (Page 1 of 5 )

    Welcome to the second part of a three-part article on building an image gallery in a 3D HTML table. With an image gallery, it is natural that viewers may want to maximize certain images for closer examination, and then restore them to their original size. This article will show you how to add this feature and others to your gallery.

    Maximizing and Restoring the Images

    There are different methods of maximizing and restoring an image. The method I summarize here is my favorite.

    Summary

    • The image to be maximized is given the CSS “position:absolute” property.

    • The image to be maximized should not be given the CSS Left and Right properties.

    • The image to be maximized is given a z-index that is higher than those of its surrounding elements.

    • The dimensions of the image are increased to maximize it.

    • The vertical align property of the parent element, possibly the TD element, should be given a value of “top.”

    • To restore, reverse the third and fourth points above. You may also give the image the CSS “position:relative” property.

    There are three functions involved. The first function works with a global variable called maximized. It can have the value true or false. When it is true, it means that the image clicked has to be maximized. When it is false, it means that the image has to be restored.

    This variable is used by the other two functions. The variable is initialized to false, meaning that the image is initially restored. This is the function and its global variable.


    var maximized = false;


    function maxRest(ID)

    {

    if (maximized == true)

    restoreFn(ID);

    else

    maximizeFn(ID);

    }


    The function is called when you click an image. Recall that each image tag has an ID. When an image is clicked, the event calls this function, sending the ID of the image clicked as an argument. When this function is called, it checks to see if the maximized variable is true. If it is true, it calls the “restoreFn(ID)” function; if it is false, it calls the “maximizeFn(ID)” function. The “maximizeFn(ID)” function maximizes the image. The restoreFn(ID) function restores the image. So each time you click the image, it is either maximized or restored.

    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 5 Hosted by Hostway
    Stay green...Green IT