Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 24th, 2005, 09:07 PM
Registered User
 
Join Date: Nov 2005
Location: , , .
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.
Reply With Quote
  #2 (permalink)  
Old November 24th, 2005, 09:24 PM
Friend of Wrox
Points: 6,468, Level: 34
Points: 6,468, Level: 34 Points: 6,468, Level: 34 Points: 6,468, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,835
Thanks: 12
Thanked 16 Times in 16 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
Reply With Quote
  #3 (permalink)  
Old November 25th, 2005, 12:11 AM
Registered User
 
Join Date: Nov 2005
Location: , , .
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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 10:27 PM
Ad Rotator js_newbie Javascript 0 April 5th, 2007 12:30 AM
Problem with user control (ad rotator) ALEX_GRIM ASP.NET 1.0 and 1.1 Professional 4 May 5th, 2005 01:52 AM
Chapter 11.....Ad Rotator problems ou812 BOOK: Beginning ASP 3.0 0 October 30th, 2003 11:29 AM



All times are GMT -4. The time now is 04:24 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.