Printed from BasicTips.com, FREE helpful articles and tips for Webmasters and Business Owners
Copyright © 1994-2006 by BasicTips.com, a division of BasicTemplates.BIZ
All rights reserved. Republication in whole or in part in any form is not permitted.

Sponsored by BasicTemplates.BIZ
Website Templates with External CSS and Removable Graphics
http://www.BasicTemplates.biz

Co-Sponsored by Effective-Website-Secrets.com
Teaching webmasters effective web development and marketing techniques via free podcasts.
http://www.Effective-Website-Secrets.com

Category: Web Design
Quickie Popup Windows with JavaScript
By BasicTemplates with External CSS

Click Here to View Live ExamplePopup windows were the rage for years but are fast becoming extinct as popup blocker software franticly tries to eliminate this overly abused feature. It's sad to think that a useful web feature that was utilized by millions of websites over the years for all the right reasons will someday be history. But that's the web!

If you use popups, popunders or popexits on your site, you may want to warn folks before they click on a link or click out of your site. Why? Because the use of these features does not always reflect well on your business as they have developed a reputation of being sneaky. They can also easily be interpreted as being website spam especially when used in conjunction with advertising other websites.

If you do use popups, have a good reason to do so and keep your site visitors comfortable by forewarning them with a popup window icon next to the link. Feel free to use these two icons on your website.



A quick way to enable the popup feature on your website is to copy/paste the following JavaScript code between the HEAD tags of your web page that will contain the link to the page you want to popup. Adjust the width and height of the popup window as you wish. You can also change the 'no' properties to 'yes' if you want a status bar, toolbar, and menubar to display on your popup window.

<script language="javascript">
<!--
function basicPop(url) { newwindow=window.open(url, 'windownew',
'width=300,height=250,status=no,toolbar=no,menubar=no');
}
//-->
</script>

Now in your HTML source code place a # character for the normal link code and add the onclick code as shown below. Replace yourpage.html with the name of your page, of course.

<a href="#" onclick="basicPop('yourpage.html')">More Information</a>