HTML
  Home arrow HTML arrow Page 2 - Maximizing and Restoring Images in a Tabul...
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

Maximizing and Restoring Images in a Tabular Database Form in HTML
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2008-10-01

    Table of Contents:
  • Maximizing and Restoring Images in a Tabular Database Form in HTML
  • Image Tags
  • Second Method of Maximizing and Restoring
  • Final Comments on the Client Side Design

  • 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


    Maximizing and Restoring Images in a Tabular Database Form in HTML - Image Tags


    (Page 2 of 4 )


    The image tags for all the images at their original large size have been written just below the start tag of the BODY element of the HTML document. This is the tag for the first image:

    <img src="watch1Big.jpg" id="I03" style="position:absolute; z-index:2; left:300px; top:100px; border:4px solid blue; display:none" onclick="maxRest('I03')" />

    The ID here is the same as that for the File Input element that has the corresponding background image in the tabular form. Each of the images are given a CSS property of “position:absolute” and “z-index:2.” The BODY element is given a z-index value of 0. We shall let the maximized picture appear around the top area of the screen. The position I have chosen is “left:300px; top:100px;”.

    Each maximized image has been given a blue border of 4px. Each of these images have been given the display property with the value “none.” Now each of these images is at its original size, which is bigger than the corresponding background image at the File Input control. With the value of the display property at “none,” the image is not displayed and does not occupy space. Each of the tags has the onclick event.

    When the corresponding File Input element is clicked, the maxRest() function is called. This function receives as argument the ID of the image. When the maximized image is clicked, this same function is called with the same ID. When the maxRest() is called, it simply checks whether the value of the above display property is “none” or “block.” If it is “none,” the function changes it to “block.” If it is “block,” the function changes it to “none.” When it is “block,” the picture is made to appear in front of its surrounding elements. When it is “none,” the picture does not appear and does not occupy space. This is the JavaScript Code, which you should fit with that of the previous part of the series.

    <script type="text/JavaScript">


    //function to maximize and restore image

    function maxRest(ID)

    {

    if (document.getElementById(ID).style.display == "none")

    {

    document.getElementById(ID).style.display = "block";

    }

    else

    (document.getElementById(ID).style.display = "none");

    }

    </script>


    The maximized images are separate images in their original sizes. This is the code for the five images. A good place to fit them is just below the start tag of the BODY element. However, you can fit them anywhere in the body element.

    <img src="watch1Big.jpg" id="I03" style="position:absolute; z-index:2; left:300px; top:100px; border:4px solid blue; display:none" onclick="maxRest('I03')" />

    <img src="watch2Big.jpg" id="I13" style="position:absolute; z-index:2; left:300px; top:100px; border:4px solid blue; display:none" onclick="maxRest('I13')" />

    <img src="watch3Big.jpg" id="I23" style="position:absolute; z-index:2; left:300px; top:100px; border:4px solid blue; display:none" onclick="maxRest('I23')" />

    <img src="watch4Big.jpg" id="I33" style="position:absolute; z-index:2; left:300px; top:100px; border:4px solid blue; display:none" onclick="maxRest('I33')" />

    <img src="watch5Big.jpg" id="I43" style="position:absolute; z-index:2; left:300px; top:100px; border:4px solid blue; display:none" onclick="maxRest('I43')" />

    More HTML Articles
    More By Chrysanthus Forcha


       · We have done a lot. We have just this chapter and the last one. Let's get it...
     

    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