
Solid, safe website tools.
Whatever your need, Will Bontrager builds powerful software solutions.
|
(Get Attention Ticker for your web site)
JavaScript-Delivered AdsBy Will Bontrager Use JavaScript to deliver ads to web sites where you are advertising at. I'll show you how. The BontragerConnection.com "Run of Site" advertising opportunity allows you to serve the ad from your own server. It gives you a lot of control. One of the ways the ad can be delivered is with JavaScript. The way I show you to do it for BontragerConnection.com can also be used to deliver ads to other web sites that allow you to do so (even your own web sites). Two files will be on your server:
The text file with the ad can contain any code a web page could contain, even JavaScript, so long as the content is acceptable to the publisher and the size is correct for the ad. Here is an example: Here is the CGI script. Save it as text2js.cgi (or other appropriate file name). After the one modification (see below), it is ready to install on your server. The only place you need to modify the script is to specify the location of the text file with the ad. If the text file with the ad is in the same directory as the script, only the file name needs to be specified. Otherwise, include the server location with the file name. See the FAQ or use the forum if you experience installation problems. If you add your own tracking code to the script, put it at the end of the script. Then the ad can be delivered without any delay that might be caused be the tracking code. Now, test what you have. There are two steps:
To test the CGI script, type its URL into your browser's address bar. If JavaScript displays in your browser window, you're good to go. Otherwise:
To test the ad in the JavaScript, put this JavaScript on a web page: Replace the http://example.com/cgi-bin/text2js.cgi URL in the JavaScript with the URL that was in your browser's address bar when you tested the CGI script. It must be the complete http://... URL. When the page with the testing JavaScript displays your ad the way you want it, copy the testing JavaScript and paste it into an email to us. We can then use that very same JavaScript to display your ad at BontragerConnection.com July 20, 2007 Please note: Articles on this website are presented "as is". However - If you have a question about a CGI script, HTML, CSS, PHP, or JavaScript
Rate this blog post.
No page reload! |
|
|
© 1998-2001 William and Mari Bontrager |
|