HTML
  Home arrow HTML arrow Completing the HTML Magic Edges Project
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

Completing the HTML Magic Edges Project
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2009-04-06

    Table of Contents:
  • Completing the HTML Magic Edges Project
  • Code to Shift Right and Left
  • The shiftRight() Function
  • Code to Shift Down and Up
  • Remarks

  • 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


    Completing the HTML Magic Edges Project


    (Page 1 of 5 )

    Welcome to the fifth part of a five-part series that shows you how to make HTML magic edges. These edges allow you to slide useful applications out of the sides of your web pages when a visitor slides his or her mouse over the edges. In this part of the series I explain the code for the project. We also conclude with some useful comments. Toward the end of this part, I give you a link to the complete code of the project in zip file format.

    The Code and its Operation

    I will give you the code as it is found in the zip file from top to bottom. I will be brief in the explanation, since we've covered the basics in the previous parts. We begin with the global variables that are used in many sections of the code. These variables are:


    var edge = "";

    var paneBack = true;

    var leftPaneShown = false;

    var topPaneShown = false;


    These variables are related to some of the technical requirements we saw in the third part of the series. When the pane has scrolled from the left edge into the page, this edge variable is given the value “left.” When the pane has scrolled from the top down into the page, the variable is given the value “top.”

    When the pane is still in the edge or has gone back into the edge, the paneBack variable is used to indicate this with the value of true.

    Now, when you click the BODY element, the pane should scroll away. When you click the pane, since the pane is in front of the BODY element, the BODY indirectly receives a click. You do not want the pane to scroll back when the BODY is not clicked directly. The next two variables above are used for this. The first one (leftPaneShown) is for the pane from the left edge. The second one (topPaneShown) is for the pane from the top edge.

    Left Edge Code

    In this section we shall talk about the code for the left mimic edge.

    The giveHeight() Function

    Ideally the left mimic edge should be as long as the entire height of the web page. It is not a straightforward task to achieve this height. We shall allow a simple design. The DOM can allow us to get the height of the screen (without the portion of the taskbar). We shall use this height for the left mimic edge. When the page is just loaded, the giveHeight() function is called by the onload event of the BODY attribute. The function gives the height. This is the function:


    function giveHeight()

    {

    document.getElementById('DL').style.height = screen.availHeight;

    }


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