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

Inside Technique : Chromeless Windows for IE
By Gabriel Suchowolski (Edited by Scott Isaacs)

Creating Chromeless Windows is a trick originally demonstrated at WEBFx. We took this technique and created a reusable library for quickly creating and managing your windows. Before we walk through the library you really need to see a simple chromeless window demonstration. With chromeless windows you have complete control over the entire window. You can create custom title bars, status bars, scrollbars, etc. You are limited only by your imagination:

View the Demonstration

You can also find a more complete demonstration at my web-site, www.microbians.com, where we use this library to create the entire web-site's experience.

THE WINDOW WITHOUT CHROME

To simplify window management, we created a very simple library with a single function for opening the chromeless window - openchromeless(). This function is similar to the standard window.open method that it opens windows without the standard chrome.

openchromeless(
  theURL, 
  wname, 
  W, 
  H, 
  windowCERRARa, 
  windowCERRARd, 
  windowCERRARo, 
  windowTIT, 
  windowBORDERCOLOR, 
  windowBORDERCOLORsel, 
  windowTITBGCOLOR, 
  windowTITBGCOLORsel) 
ArgumentDescription
theURL theURL is the URL of the page to load
wnamethe internal name (target) for the window
Whorizontal size of the window.
Hvertical size of the window
windowCERRARa
windowCERRARd
windowCERRARo
Three gifs that represent the three states of the icon used to close the window.
windowBORDERCOLOR The color of the edge of the window by default
windowBORDERCOLORsel the color of the edge when the window moves
windowTITBGCOLOR the bottom of color of the title
windowTITBGCOLORsel the bottom of the title when the window moves

This function exists in pz_chromeless.js. Simply including this library and calling this function creates your chromeless window. In our demonstration, we opened the window as follows:

function openIT() {
  theurl="test.asp"
  wname ="CHROMELESSWIN"
  W=785;
  H=270;
  windowCERRARa 	= "img/close_a.gif"
  windowCERRARd 	= "img/close_d.gif"
  windowCERRARo 	= "img/close_o.gif"
  windowTIT 	    	= "  window title"
  windowBORDERCOLOR   	= "#000000"
  windowBORDERCOLORsel	= "#FFFFFF"
  windowTITBGCOLOR    	= "#e0e0e0"
  windowTITBGCOLORsel 	= "#a0a0a0"
  openchromeless(theurl, wname, W, H, windowCERRARa, windowCERRARd, windowCERRARo, 
     windowTIT, windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR, windowTITBGCOLORsel)
}

Next we explain how the chromeless function works for creating and dragging the window.

Page 1:Chromeless Windows for IE
Page 2:The Chromeless Window Layout
Page 3:The Code and Sample Files