a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Hosting from $3.99 per month!

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions. dd

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Banner Ad Script

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Search Engine Optimization and Web Business >> Banner Ad Script
Page: [1]
 
cooper

 

Posts: 773
From: Woburn MA USA
Status: offline

 
Banner Ad Script - 4/21/2003 10:31:57   
I am looking for a banner ad script. I don' t need to track click throughs or impressions, I just need to randomly disply one of 10 to 12 ad banners in my header.

The pages are both HTML and ASP. I do not want to switch the HTML pages to ASP pages so the script can' t be ASP based.

Any suggestions?

_____________________________

Cooper

BAC Web Design - Tools & Templates - Buck A Ball - Stopspamstop.com
Gil

 

Posts: 7533
From: North Carolina, USA
Status: offline

 
RE: Banner Ad Script - 4/21/2003 11:35:52   
Nice on at the bottom of the page here: http://markdonline.com/code/code.php3

_____________________________

Gil Harvey, 1947-2004

(in reply to cooper)
mbmunday

 

Posts: 162
Joined: 8/8/2002
From: North Richland Hills, Texas
Status: offline

 
RE: Banner Ad Script - 4/24/2003 2:21:30   
Try this.......this is a JavaScript one that simply rotates pictures based on milliseconds. Just replace the number of seconds with whatever you find appropriate. You can keep your .html extensions with this one.


<script language=" javascript" >

/*
Random image slideshow- By Tyler Clarke (tyler@ihatecoffee.com)
For this script and more, visit http://www.javascriptkit.com
*/

var delay=10000 //set delay in miliseconds
var curindex=0

var randomimages=new Array()

	randomimages[0]=" images/banner1.jpg" 
	randomimages[1]=" images/banner2.jpg" 
	randomimages[2]=" images/banner3.jpg" 
	randomimages[3]=" images/banner4.jpg" 
	randomimages[4]=" images/banner5.jpg" 
	randomimages[5]=" images/banner6.jpg" 
	randomimages[6]=" images/banner7.jpg" 
                randomimages[7]=" images/banner8.jpg" 
                randomimages[8]=" images/banner9.jpg" 

var preload=new Array()

for (n=0;n<randomimages.length;n++)
{
	preload[n]=new Image()
	preload[n].src=randomimages[n]
}

document.write(' <img name=" defaultimage"  src=" ' +randomimages[Math.floor(Math.random()*(randomimages.length))]+' " >' )

function rotateimage()
{

if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0? 1 : curindex-1
}
else
curindex=tempindex

	document.images.defaultimage.src=randomimages[curindex]
}

setInterval(" rotateimage()" ,delay)

</script>


Good luck,

MB

(in reply to cooper)
mbmunday

 

Posts: 162
Joined: 8/8/2002
From: North Richland Hills, Texas
Status: offline

 
RE: Banner Ad Script - 4/24/2003 2:23:07   
Awww.....I just realized that this one is just a basic one for images, without links. I' m not that great at JavaScript so I don' t know if you could modify it to add a link to each picture.

MB

(in reply to cooper)
Nancy

 

Posts: 3626
Joined: 11/9/1999
From: Nebraska
Status: offline

 
RE: Banner Ad Script - 4/24/2003 3:00:31   
I' ve used this one before:

http://www.javascriptcity.com/scripts/local/simage2.htm

You can have more than the five shown in the example. I used about 20. Just be sure you change the total number in the script from 5 to however many you want - two places, one place for images, and one for the URL' s.

I set it up as an include page so it could easily appear on all pages.

Nancy



_____________________________

Easy Estimates -- is a simple to use tool to quickly build a Web site page enabling visitors to quickly and easily create an estimate of the cost of services that you provide.

(in reply to cooper)
cooper

 

Posts: 773
From: Woburn MA USA
Status: offline

 
RE: Banner Ad Script - 4/28/2003 13:42:50   
OK... I decided to use Nancy' s recommended scripts. However, I want to place this script in an " includes" page (the header). Do I need to put the script information in the " head" section of every page on my site?

_____________________________

Cooper

BAC Web Design - Tools & Templates - Buck A Ball - Stopspamstop.com

(in reply to cooper)
Nancy

 

Posts: 3626
Joined: 11/9/1999
From: Nebraska
Status: offline

 
RE: Banner Ad Script - 4/28/2003 16:34:00   
You should be able to put everything in the body of the include page and it will work on all pages where you include it.

Nancy


_____________________________

Easy Estimates -- is a simple to use tool to quickly build a Web site page enabling visitors to quickly and easily create an estimate of the cost of services that you provide.

(in reply to cooper)
cooper

 

Posts: 773
From: Woburn MA USA
Status: offline

 
RE: Banner Ad Script - 4/28/2003 16:57:24   
I get a runtime error on line 28. I built this on its own page and it worked fine. The I attempted to place the code in my " includes/header.htm" page and started to get the error. Suggestions?

_____________________________

Cooper

BAC Web Design - Tools & Templates - Buck A Ball - Stopspamstop.com

(in reply to cooper)
Nancy

 

Posts: 3626
Joined: 11/9/1999
From: Nebraska
Status: offline

 
RE: Banner Ad Script - 4/29/2003 2:10:44   
It might work better if you don' t try to do it as an include within an include? Although I think that' s the way I did it and it worked.

Sorry I couldn' t be more help.

Nancy


_____________________________

Easy Estimates -- is a simple to use tool to quickly build a Web site page enabling visitors to quickly and easily create an estimate of the cost of services that you provide.

(in reply to cooper)
Page:   [1]
OutFront Discoveries

All Forums >> Web Development >> Search Engine Optimization and Web Business >> Banner Ad Script
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts