Solved

Classic ASP Sequential Image Rotator with 8 seconds time delay

Posted on 2010-08-23
2
500 Views
Last Modified: 2012-05-10
Hi all,

I need a classic ASP (not ASP.net) Image rotator that rotates sequentially not randomly(it's actually a .jpg banner rotator). Also, it needs to change every 8 seconds, not on the refresh of the page. Please, use the code below and modify it since this is the code my friend already has. One last thing, please no Javascript.

Thanks very much in advance,
Guzz

<%
' select 1 ad to show
randomize
random_number=int(rnd*3)+1

If random_number = 1 Then
Response.Write("<a href=""http://cs5launch.adobe.com/"" target=""_blank"" style=""float: right;""><img src=""images/cs5English728x90.jpg"" width=""728"" height=""90""></a>")
elseif random_number = 2 Then
Response.Write("<a href=""http://www.macpapers.com/"" target=""_blank"" style=""float: right;""><img src=""images/mac_conservation_4.jpg"" width=""728"" height=""90""></a>")
else
Response.Write("<a href=""http://www.saphiraconsumables.com/"" target=""_blank"" style=""float: right;""><img src=""images/728x90_Saphira.jpg"" width=""728"" height=""90""></a>")
End If
%>
0
Comment
Question by:guzz1
2 Comments
 
LVL 11

Accepted Solution

by:
madgino earned 250 total points
Comment Utility
Asp code is running on the server. From the server you can't control the client (page in browser) as the client is the one that it initiates requests and the server is just responding.
You need to refresh page/picture on the client at every 8 seconds, you can't so this from asp as this code is on the server, you need to run some code on the client to do this.
And for running code on the client you have a different language called javascript.

So using javascript is the only possible solution, here are some straightforward links: Link1, Link2

If you really can't use Javascript because of technical restrictions you must add a meta tag to automatically refresh the page at 8 seconds and to handle this in asp. Also if you don't want to reload the whole page you'll have to use a frame or a iframe for the pictures section and to add some parameters to keep track of the pictures. Anyway this is a very complicated solution and I do not recommend it.
0
 
LVL 28

Expert Comment

by:sybe
Comment Utility
No javascript? You could use an iframe with a refresh metatag.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now