Logo Home | Community | Developer's Paradise | Jobs
User Groups | Site Tools | Site Information | Search

Inside Technique : DHTMLLib Windows
By Scott Isaacs

In this article, we show you how easy it is to create a simple cross-browser DHTML-based drag-drop windowing system using DHTMLLib 2.0. We will take you through the scripting techniques used and compromises we made to make this work on both browsers.

To handle the cross-browser differences, we take advantage of our DHTMLLib cross-browser library. By using DHTMLLib, we did not have to use any browser detection to handle the drag and drop of the windows. However, we did need to account for limitations in Netscape Navigator and the Macintosh version of Internet Explorer.

Before we examine the code and the techniques used, we recommend you view our windowing demonstration. The key features to look at are dragging windows (you must click on the title bar text to drag - more on why later) and clicking on a window automatically brings it to the top. If you are not running a 4.0 browser still take a look at the page. You will see the windows rendered as tables. [View Demo].

Next we explain how to create the windows and how we worked around a limitation in Netscape's CSS positioning.