|
Guide to creating simple chromeless popup windows.
|
By Michael Bloch
[Hits: 16427]
|
|
Popup windows - hate 'em or love 'em; they are a constantcompanion during our Internet surfing. They can be quite useful,especially the chromeless variety.
A chromeless popup window is one that doesn't show the browsersmenu or tool bar, but does retain the title bar (for easyclosing). Some visitors have so many options on their tool barsthat they take up over a quarter of the screen height!
Chromeless popup windows are a great way to deliver listinformation and extra help for filling in forms without boggingdown your pages.
There are many scripts available for creating popups, butsometimes you'll just want something simple that won't requireyou to incorporate 100 lines of JavaScript!
This particular chromeless popup window procedure will work inNetscape and IE Versions 4+. It will create a link activatedwindow of a fixed size, but will allow for scrollbars ifnecessary.
To view a demo, click on the "20 second site survey" link on theright hand menu of our home page:
http://wwww.tamingthebeast.net
INSTRUCTIONS:
First, create and save a standard page with the information youwish to be displayed in the popup window. The elements should beplaced within a table structure. Suggested width of table:around 330 - 350 pixels.
And if you want to create a "Close this Window" statement in thepage:
Close this window< d>
If you choose not to include this snippet, visitors will stillbe able to close the window via the popup window title barcontrols.
Second, the script to launch the chromeless popup window. Copyand paste this into the HTML (between the and tags) of the page you wish to launch the popup from (change theproperties in capital letters to suit):
You can change width and height to suit, but don't make it toonarrow, otherwise site visitors will need to scroll horizontallyto view the content. Too wide a setting will cover the majorityof the screen area for those users still running 640x480resolution.
When copying scripts like the one above, ensure you paste itinto Notepad first; then copy it again and transfer it to yourHTML. Copying and pasting code straight from a web page canproduce some pretty weird results.
Next, the hyperlink to use to engage the script (Change theproperties in capital letters to suit):
CLICK HERE
Done!
If you are looking for a script to create an automated siteentry or site exit popup window, check out our free javascriptcode generators section, specifically:
http://www.tamingthebeast.net/scripts/windowsframesjavascripts.htm
but, use with caution - I don't know many visitors who uponentering a site and seeing a popup window yell, "whoopeee!!!"
Michael Bloch? michael@tamingthebeast.net?http://www.tamingthebeast.net Tutorials, web content and tools,software and community. Web Marketing, eCommerce & Developmentsolutions. _____________________________________________?
Copyright information....If you wish to reproduce this article,please acknowledge "Taming the Beast" by including a hyperlinkor reference to the website (www.tamingthebeast.net) & send mean email letting me know. The article must be reproduced in it'sentirety & this copyright statement must be included. Thanks.Visit www.tamingthebeast.net to view other great articles FREEfor reproduction!
|
|
|
|
|
|