HTML
  Home arrow HTML arrow Working the Pane for HTML Magic Edges
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

Working the Pane for HTML Magic Edges
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 2
    2009-03-30

    Table of Contents:
  • Working the Pane for HTML Magic Edges
  • The Mimic Edges
  • The Rest of the CSS
  • Showing the Pane

  • 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


    Working the Pane for HTML Magic Edges


    (Page 1 of 4 )

    In this part of the series, we effectively carry out a project. The project deals with a web page. The aim of the project is to allow visitors to move their mouse pointer to the edge of the web page to cause a pane with a calculator or some other useful tool to scroll into the page. The visitor can do whatever they want with the tool. Then, when they click on the BODY of the page, outside the pane, the pane scrolls back into the edge. The detailed requirements of the project are in the previous part of the series.

    Introduction

    I gave a lot of detailed explanation in the previous part of the series. Explanations in this and the next part of the series will be summarized where possible.

    The tool for the pane in our project is a calculator.

    Minimum Components on the Web Page

    This is a pedagogic exercise so we shall deal only with the minimum number of components (HTML elements) necessary.

    The Pane

    The pane is a DIV element having another DIV element that just fits into it. This is the calculator inside the two DIV elements:


    <div id="Cont" onclick="checkRemSit()" style="position:absolute; z-index:2; left=0px;top:0px; display:none">

    <div id="Calc" style="left:0px;top:0px">

    <input type="text" id="CI1" readonly><br />

    <button type="button" class="CalcBut" id="B7">7</button><button type="button" class="CalcBut" id="B8">8</button><button type="button" class="CalcBut" id="B9">9</button><button type="button" class="CalcBut" id="BD"">/</button><button type="button" class="CalcBut" id="BMM">C</button><br />

    <button type="button" class="CalcBut" id="B4">4</button><button type="button" class="CalcBut" id="B5">5</button><button type="button" class="CalcBut" id="B6">6</button><button type="button" class="CalcBut" id="BX">X</button><button type="button" class="CalcBut" id="BRM">RM</button><br />

    <button type="button" class="CalcBut" id="B1">1</button><button type="button" class="CalcBut" id="B2">2</button><button type="button" class="CalcBut" id="B3">3</button><button type="button" class="CalcBut" id="BMI">-</button><button type="button" class="CalcBut" id="BMP">M+</button><br />

    <button type="button" class="CalcBut" id="B0">0</button><button type="button" class="CalcBut" id="BPM">+/-</button><button type="button" class="CalcBut" id="BPOINT">.</button><button type="button" class="CalcBut" id="BP">+</button><button type="button" class="CalcBut" id="BEQ">=</button>

    </div>

    </div>


    I will not deal with the code that does the calculation in this series. I've already written an article series on how to build a web page calculator, which is currently running on Dev Articles. You can read this article to see how the calculator functions.

    Identify the DIV elements above. There is one DIV element inside another one. Inside the inner DIV element you have the elements for the calculator. The inner DIV element keeps the calculator components together. These elements consist of an Input Text element, buttons and line break elements. I will not say much about these elements – you can read the article series for more details.

    The inner DIV element has the ID "Calc." In its style attribute, you have “left:0px;top:0px”. If you know that your CSS left and top values will be changing (by script) it is advisable to put their initial values in the style attribute (of the element) and not in the style sheet.

    The ID of the outer DIV element is "Cont." It has an onclick event attribute. Click on it and the checkRemSit() function is called. I will explain how the function operates later.

    This DIV element has a style attribute. The first property here is the position property. It has the "absolute" value. The next property is the z-index property with a value of 2. The BODY element is given a z-index value of 0. With these three properties, the pane (outer DIV) will appear in a layer above the rest of the elements, everything being equal.

    Still in the style attribute, the next thing you see is “left=0px;top:0px;” That is, the left position is zero pixels and the right position is zero pixels. These values will be changing by script, so it is advisable to have them in the attribute. They are like the default values.

    When the pane is coming out from or going to the left edge, the script causes the left value to be zero; when it is coming out from or entering the top edge, its top value is zero. The left and top properties should be put in the style attribute. The rest of the other properties can be put in the style sheet.

    The last property we have in the style attribute is the display property. Its value is “none.” With the initial value of none, you do not see the pane. When you have to see the pane, the script will change the value to “block.” The inner DIV element will then scroll within this block.

    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