Metachecker.net
|
TrafficChecker.net
|
RankChecker.net
Learn Java Script Today
|
Over 5000 Free Fonts
|
Tutorials
|
Javascript Forum
|
Other Javascript Resources
|
Cheat Sheet
JavaScript Basics
Inserting Javascript
Complete Tutorial
Advance DHTML Tutorial
Script archive
Advanced Tutorials
Alert Scripts
Animation
Audio
Background Effects
Banner Ads
Browser Window
Buttons
Button Forms
Calculcators
Calendars
Clocks & Dates
Cookies
Cursor Effects
DHMTL Games
DHTML Miscellaneous
Equivalents
Forms
Games
IE4+ Scripts
IE5+ Scripts
Image Effects
Image Miscellaneous
Links & Buttons
Math Related
Messages Miscellaneous
Miscellaneous
Mouse Tricks
Navigation
Page Details
Password Protection
Pulldown Menus
Random Stuff
Scrolling
Status Bar
Text Animation
User Detail
User Info
Window Control
Pop-up ad banner script
A script that loads a pop up window with an ad banner inside. Clicking the banner will load the target URL in the main window while closing the pop up at the same time.
Insert into <HEAD>
<script> /* pop up script- By (www.wsabstract.com) Over 200+ free, original scripts here! */ //change the width and height of the pop up window, if desired var newwindow=window.open("popup.htm","","width=485,height=70") if (newwindow != undefined && newwindow != null) newwindow.creator=self </script>
Copy the entire code below and save it as "popup.htm"
<html> <head> <title>Please support our sponsor!</title> </head> <body bgcolor="#FFFFFF"> <p align="left"> <script> function loadurl(url){ window.creator.location=url window.close() } </script> <a href="http://ad.linkexchange.com/1/X348076/gotoad.map" target="_top" onClick="loadurl(this.href);return false"><img width="440" height="40" border="1" ismap alt="LinkExchange" src="http://ad.linkexchange.com/1/X348076/logoshowad?free"></a> </p> </body> </html>
Other Options
Step 2: Copy the entire code below and save it as "popup.htm", under the same directory as the page in Step 1. This is the page that will get loaded into the pop up window. It contains both the script required to load the target URL into the main window, plus a sample Link Exchange code. Change the LinkExchange code to your own banner's code. You can in general edit any part of the below code EXCEPT the parts in red. They should be perserved. The code onClick="loadurl(this.href);return false" should be inserted inside the <a> tag of your banner code, like below. <html> <head> <title>Please support our sponsor!</title> </head> <body bgcolor="#FFFFFF"> <p align="left"> <script> function loadurl(url){ window.creator.location=url window.close() } </script> <a href="http://ad.linkexchange.com/1/X348076/gotoad.map" target="_top" onClick="loadurl(this.href);return false"><img width="440" height="40" border="1" ismap alt="LinkExchange" src="http://ad.linkexchange.com/1/X348076/logoshowad?free"></a> </p> </body> </html>