The layer while rolling over the link. : Layer « HTML « JavaScript DHTML

JavaScript DHTML
1. Ajax Layer
2. Data Type
3. Date Time
4. Development
5. Document
6. Dojo toolkit
7. Event
8. Event onMethod
9. Ext JS
10. Form Control
11. GUI Components
12. HTML
13. Javascript Collections
14. Javascript Objects
15. Javascript Properties
16. jQuery
17. Language Basics
18. Mochkit
19. Mootools
20. Node Operation
21. Object Oriented
22. Page Components
23. Rico
24. Scriptaculous
25. Security
26. SmartClient
27. Style Layout
28. Table
29. Utilities
30. Window Browser
31. YUI Library
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
JavaScript DHTML » HTML » Layer 
The layer while rolling over the link.


/*
JavaScript Unleashed, Third Edition
by Richard Wagner and R. Allen Wyke 

ISBN: 067231763X
Publisher Sams CopyRight 2000

*/
<html>
<head>
  <title>JavaScript Unleashed</title>
  <style type="text/css">
  <!--
    #layer1{
      background-color: red;
      height: 100;
      left: 10;
      position: absolute;
      top: 50;
      width: 100;
      visibility: hidden;
    }
  -->

  </style>
  <script type="text/javascript" language="JavaScript1.2">
  <!--
    // Create global variables for browser type
    var isIE = new Boolean(false);
    var isNav = new Boolean(false);
    var unSupported = new Boolean(false);
    var layer = new String();
    var style = new String();
   
    // Determine if the browser is Internet Explorer, Navigator,
    // or other. Also, set the layer variable depending on the
    // type of access it needs.
    function checkBrowser(){
      if(navigator.userAgent.indexOf("MSIE"!= -1){
        isIE = true;
        layer = ".all";
        style = ".style";
      }else if(navigator.userAgent.indexOf("Nav"!= -1){
        isNav = true;
        layer = ".layers";
        style = "";
      }else{
        unSupported = true;
      }
    }
   
    // Take the state passed in, and change it.
    function changeState(layerRef, state){
      eval("document" + layer + "['" + layerRef + "']"  + style + ".visibility = '" + state + "'");
    }
  //-->
  </script>
</head>
<body onload="checkBrowser()">
  <div name="layer1" id="layer1">
    Hello World!
  </div>
  <a href="javascript:void(0)"
     onmouseout="changeState('layer1','hidden')"
     onmouseover="changeState('layer1','visible')">

    Rollover to show and hide the layer.
  </a>
</body>
</html>

           
       
Related examples in the same category
1. Layer 'srcFilter' Example
2. Monitors divisions (or layers) on dynamic Web pages (DHTML)
3. Hide and show layer
4.  Layer Background Colors (W3C)
5. Setting Layer Backgrounds (W3C)
6. Accessing Layers with JavaScript
7. 'layer' and 'ilayer' Tag Properties
8. Detecting Navigator and Internet Explorer
9.  Adjusting Layer clip Properties (W3C)
10. Comparison of Layer and Clip Location Properties (W3C)
11.  Testing Nested Layer Coordinate Systems (W3C)
12. Nested Layer Visibility Relationships (W3C)
13. Relationships Among zIndex Values (W3C)
14. Dragging a Layer (W3C)
15. Resizing a Layer (W3C)
16. Methods and Properties of the Layer Object
17. Layer seek
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.