Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Classic ASP Sequential Image Rotator with 8 seconds time delay

Posted on 2010-08-23
2
510 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
ID: 33508338
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
ID: 33508779
No javascript? You could use an iframe with a refresh metatag.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
One field not displaying content (ASP Classic) 8 31
Select case on click 3 21
Insert Button on a table 16 38
IIS 7 and executing pages using localhost 16 14
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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/…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

828 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