Print Page | Close Window

looking for a free asp banner script

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=1492
Printed Date: 29 March 2026 at 7:39pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: looking for a free asp banner script
Posted By: prigozu
Subject: looking for a free asp banner script
Date Posted: 30 March 2003 at 2:29pm

Hi guys,

I am looking for a free asp banner rotator script that suppports jpeg, gif and flash, can anybody help me please.

Thank you




Replies:
Posted By: Gullanian
Date Posted: 30 March 2003 at 3:22pm

thats a pretty easy script to make yourself if you hardcode the images and address

anyway, heres a javascript for you

<SCRIPT LANGUAGE="JavaScript">
function random_banner(){
  var i=0;
  banners = new Array();
  banners[0] = '<IMG SRC="banner0.gif" WIDTH=400 HEIGHT=40>';
  banners[1] = '<IMG SRC="banner1.gif" WIDTH=400 HEIGHT=40>';
  banners[2] = '<IMG SRC="banner2.gif" WIDTH=400 HEIGHT=40>';
  today = new Date();
  i=today.getSeconds();
  n=banners.length;
  return banners[i-Math.round((i-1)/n)*n];
}
</SCRIPT>

<SCRIPT LANGUAGE="JavaScript">
document.write(random_banner())
</SCRIPT>

in the array above just add the banners you want



Posted By: prigozu
Date Posted: 30 March 2003 at 3:29pm

thanks for your help, but i am still a little confuse, where should i put the link for example and am i going to be able to use jpg, gif and flash banner all together on this script.



Posted By: Gullanian
Date Posted: 31 March 2003 at 12:55am
banners[0] = '<a href="yoursite.com"><IMG SRC="banner0.gif" WIDTH=400 HEIGHT=40></a>';


Posted By: prigozu
Date Posted: 01 April 2003 at 8:51am

For some reason i am getting error on the page, I might be doing something wrong but anyways by any chance do you have an asp script.



Posted By: michael
Date Posted: 01 April 2003 at 10:38am
asp has a built in banner rotator. did you look at that. one example you find http://www.aspwebpro.com/aspscripts/contentmgmt/banneradrotator.asp - here

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: prigozu
Date Posted: 01 April 2003 at 12:47pm
does it support flash (swf) banners?


Posted By: michael
Date Posted: 01 April 2003 at 1:05pm
don't know. play around with it.

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: prigozu
Date Posted: 01 April 2003 at 1:20pm

I don't know how to write codes, i'm a graphic designer, i already have a banner script that i use on my site and it works very well the only problem is that it only supports gif & jpeg so it limites me if i want to design a flash banner for my clients, i need something that support all 3 formats. I will appreciate some help on finding the script.



Posted By: michael
Date Posted: 01 April 2003 at 1:55pm
Well looking into it it seems that the ad rotator uses image tags in a text file and flash are objects so it might not work. Might be wrong there. There are a few solutions found on the web most that look good cost money though. Can't you just make a flash movie with different links to different banners. ok you would not have any weighing in there but it would be a banner rotator. go to google and search around, there should be some stuff for you.

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: pedalcars
Date Posted: 09 May 2003 at 8:22am
Originally posted by Gullanian Gullanian wrote:


<SCRIPT LANGUAGE="JavaScript">
function random_banner(){
  var i=0;
  banners = new Array();
  banners[0] = '<IMG SRC="banner0.gif" WIDTH=400 HEIGHT=40>';
  banners[1] = '<IMG SRC="banner1.gif" WIDTH=400 HEIGHT=40>';
  banners[2] = '<IMG SRC="banner2.gif" WIDTH=400 HEIGHT=40>';
  today = new Date();
  i=today.getSeconds();
  n=banners.length;
  return banners[i-Math.round((i-1)/n)*n];
}
</SCRIPT>


in the array above just add the banners you want



Hi,

I'm trying this and it works fine with 1, 2 or 3 banners (like above).

However, when I add a fourth banner (banners[3]), it doesn't show - I get the word "undefined" on the page instead.

Currently the fourth entry is an exact duplicate of the (working) third entry (yes, I have changed it's number!)

Any suggestions?


-------------
http://www.pedalcars.info/ - www.pedalcars.info

The most fun on four wheels



Posted By: Bluefrog
Date Posted: 10 May 2003 at 12:14pm

This is exactly what you want:

<%
SET objFrontAd=Server.CreateObject("MSWC.ContentRotator")
FrontAdPath="adRotator/myAds.txt"
FrontAd=objFrontAd.ChooseContent(FrontAdPath)
Response.Write FrontAd
SET objFrontAd=Nothing
%>

And then in the adRotator/myAds.txt  file enter something like:

%% 1
<a href="someURL.asp"><IMG SRC="myImage_1.jpg"></a>

%% 1
Any old HTML or text or whatever you feel like goes here. It cannot contain any ASP script though. <img src="thisPicture.gif>

Check the IIS documentation for more information on how to use the IIS ad rotator. It's drop dead simple and it works. Since objects are not script, they will work. Just enter the proper HTML code and you're good to go.

Cheers

 

 

 

 



Posted By: pedalcars
Date Posted: 12 May 2003 at 5:02am
Thanks, I'll give it a go!

-------------
http://www.pedalcars.info/ - www.pedalcars.info

The most fun on four wheels




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net