spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / dhtml / diner / seethru

Developer News
Metasploit 3.2 Offers More 'Evil Deeds'
'Thank You Apple. Seriously.'
The Buzz: BlackBerry App Store Seen Next

Positioned Elements and OS Controls, Applets and Plug-ins


This article was originally written in September of 1998, close to four years ago. Since then many new versions of NS and IE have appeared on all platforms. Completely new browsers like Opera and Konqueror are steadily being adopted by many users.

Unfortunately, the problems originally discussed in this article still exist, although possibly not to the degree that they did back then. DHTML authoring has grown exponentially in this time, so a review and update of the problem seems warranted.

The Problem Illustrated

The bordered element above right is a draggable positioned element. Grab it and move it over the SELECT form element below. What happens? Probably not the first time you've seen this behavior. The SELECT element shows through the draggable layer. The best behavior is in NS6.1+ where only the scrollbars show through. All browsers, however, have some problem with SELECT elements.

The Problem Stated

There are certain elements that "float above" HTML elements.

  • This is not a "z-index" issue.

  • There is no fix.

  • There are authoring workarounds, but they are not in the scope of this article.

In this article, we will demonstrate this problem, in full. Hopefully, it will give you a better understanding of what to avoid when developing DHTML pages.

The Problem Demystified

When HTML first introduced the use of forms, it called upon already-existing controls within the operating system to display form elements. A checkbox, a text input, a drop-down SELECT menu, or any other form element, was created by placing the operating system's built-in checkbox, text input, or menu in a Web page. That is, although they are called through HTML, they are not created by HTML, as say, a heading or a paragraph is. The easiest way to prove this is to view form elements on different platforms. They always correspond to the platform standard, not to anything you have coded.

In addition to form elements, the same behavior is witnessed with Java applets, Active-X controls and plug-ins, all of which are external components placed in the HTML page.

This "floating" had not been an issue, however, until the advent of DHTML and the introduction of positioned elements. Authors now find that they cannot position their elements over certain other elements, without having holes "bored" into the positioned elements.

Previously on DHTML Lab

This problem was first mentioned in our first Drag and Drop column, where the draggable positioned elements could be dragged over a persistent INPUT button.

More recently, users of our popular HM script have written to complain that the menus were not hiding the Java applet that co-existed on the page, or the form elements, or plug-ins. A workaround was suggested in Column 36: evaluate_upon_tree_show evaluate_upon_tree_hide.

What the Big Guys Say

Netscape has documented this behavior since the first beta release of Communicator 4. (the italics are mine)

"Layers can contain form elements, applets, and plug-ins, which are known as windowed elements. These elements are special in that they float to the top of all other layers, even if their containing layer is obscured."

Netscape Docs

Microsoft explains the behavior in this way:

"This element is a windowed control and does not support the z-index attribute or zIndex property."

MSDN SELECT Docs
"The property does not apply to windowed controls, such as select objects."

MSDN z-index Docs
"As of Microsoft® Internet Explorer 5.5, the iframe object is windowless and supports the zIndex property. In earlier versions of Internet Explorer, the iframe object is windowed and, like all windowed controls, ignores the zIndex property. If you maintain Web pages that were designed for earlier versions of Internet Explorer that do not support the zIndex property, you might want to redesign the pages, especially if the pages contain iframe objects that are stacked on top of windowed controls, such as select objects. You can use the visibility attribute to hide windowed controls that you want an iframe object to overlap. You can also position windowed controls so that iframe objects do not overlap them."

MSDN IFRAME Docs

This Article

In this article, we will demonstrate these "special" and "windowed" elements. It would be best if you could test the behavior in several browsers/versions, although the differences will be mentioned.

We will look at HTML element behavior, when positioned over:

Again, there is no fix. This article exists only to save you the hassle of creating test pages, by demonstrating the problem in full.

First, a look at form elements.



Produced by Peter Belesis and



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
Avaya Article: Call Control XML - Powerful, Standards-Based Call Control
Tripwire Whitepaper: Seven Practical Steps to Mitigate Virtualization Security Risks
Internet.com eBook: The Pros and Cons of Outsourcing
Go Parallel Article: Scalable Parallelism with Intel(R) Threading Building Blocks
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
Go Parallel Article: James Reinders on the Intel Parallel Studio Beta Program
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Go Parallel Article: Getting Started with TBB on Windows
HP eBook: Storage Networking , Part 1
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Go Parallel Video: Intel(R) Threading Building Blocks: A New Method for Threading in C++
HP Video: Is Your Data Center Ready for a Real World Disaster?
Microsoft Partner Portal Video: Microsoft Gold Certified Partners Build Successful Practices
HP On Demand Webcast: Virtualization in Action
Go Parallel Video: Performance and Threading Tools for Game Developers
Rackspace Hosting Center: Customer Videos
Intel vPro Developer Virtual Bootcamp
HP Disaster-Proof Solutions eSeminar
HP On Demand Webcast: Discover the Benefits of Virtualization
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Microsoft Download: Silverlight 2 Software Development Kit Beta 2
30-Day Trial: SPAMfighter Exchange Module
Red Gate Download: SQL Toolbelt
Iron Speed Designer Application Generator
Microsoft Download: Silverlight 2 Beta 2 Runtime
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
IBM IT Innovation Article: Green Servers Provide a Competitive Advantage
Microsoft Article: Expression Web 2 for PHP Developers--Simplify Your PHP Applications
Featured Algorithm: Intel Threading Building Blocks - parallel_reduce
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES
webref The latest from WebReference.com Browse >
Popular JavaScript Framework Libraries: An Overview · Controllers: Programming Application Logic - Part 2 · How to Use JavaScript to Validate Form Data
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Choosing the Right Online Backup Provider · Mother Avaya Nurtures Her Technology Partners · Software as a Service a Winning Model for Hotspot Provider

All Rights Reserved. Legal Notices.
Created: Sept 20, 1998
Revised: August 25, 2003

URL: http://www.webreference.com/dhtml/diner/seethru/



I'm a draggable positioned element (layer).
---
Grab and drag me over the SELECT element on this page.