Wrox Programmer Forums
|
Classic ASP Components Discussions specific to components in ASP 3.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 24th, 2005, 09:07 PM
Registered User
 
Join Date: Nov 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default ad rotator help

Hi I am pretty new to asp and would like some help with an add rotator. I have a website which has about 50 pages and would like to display 10 really small images at a time on some about a third of the pages and a different set of 10 images on another third of the pages and yet a different set of images on the remaining pages. I would also like the images that display to be random because I have about 50 images for each section. If someone could please help me with this, I would really appreciate it. Thank so much.
 
Old November 24th, 2005, 09:24 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Havnt imlimented an ad rotator in about two years, here my code from then:

1..Place this where you want the ads to appear:


2..The contents of the adrotator.asp:
<%
  If Request.Querystring("url") <> "" Then

    Response.Redirect(Request.Querystring("url"))

  Else
    Dim txtAd, objAd

    Set objAd = Server.CreateObject("MSWC.AdRotator")

    txtAd = objAd.GetAdvertisement("adlist.txt")
  End if
%>
3..The contents of adList.asp:
redirect adrotator.asp
border 0
height 60
width 400
*
ads/banner_cabrinha.gif
http://www.cabrinha.com
go to www.cabrinha.com
1
ads/banner_gswell.gif
http://www.kitesurf.co.nz
go to www.kitesurf.com
1
ads/cabrinhaAd.gif
http://www.cabrinha.com
go to cabrinha.com
1


In the example above all three files are to be placed in the root of your web site, place the images in a folder called add. If you do this the above code is cut n paste


Wind is your friend
Matt
 
Old November 25th, 2005, 12:11 AM
Registered User
 
Join Date: Nov 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi thanks for the reply. I was just wondering though would I not have to put my images in three different arrays and then randomly display the arrays on the pages that I would like. For example if I have three arrays with 30 images in each and I would like to show 10 images from the first array on pages that are in a subfolder called finance and my second array is to display only 10 images randomly but on pages that are in another subfolder called resources and the third array on all the other pages that are not in those two folders? What would you think is the best way to display this?
Thanks in advance for any advice you might have.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Add existing AD user to AD group via ADSI? thiazi Classic ASP Basics 0 August 24th, 2007 09:27 PM
Ad Rotator js_newbie Javascript 0 April 4th, 2007 11:30 PM
Problem with user control (ad rotator) ALEX_GRIM ASP.NET 1.0 and 1.1 Professional 4 May 5th, 2005 12:52 AM
Chapter 11.....Ad Rotator problems ou812 BOOK: Beginning ASP 3.0 0 October 30th, 2003 11:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.