Solved

Shuffle banners

Posted on 2004-08-04
4
559 Views
Last Modified: 2012-05-05
How can i shuffles client banners on my site?
0
Comment
Question by:golfDoctor
  • 2
4 Comments
 
LVL 31

Accepted Solution

by:
alorentz earned 500 total points
ID: 11714849
Name all you pictures with numbers:

1.jpg
2.jpg
3.jpg
etc...

Then randomize to get number:

<%
Randomize   ' Initialize random-number generator.
pic = Int((6 * Rnd) + 1)  'random number 1-6
%>
<img src="<%=pic%>.jpg">
%>
0
 
LVL 22

Expert Comment

by:neeraj523
ID: 11714909
Hello

You can do it at client end only without refreshing ur page..

========================================================
<SCRIPT Language="Javascript">
counter = 0
imgArr = new Array("img0.gif","img1.gif","img2.gif","img3.gif","img4.gif")

setInterval("changeImage()",1000)
function changeImage()
{
     document.all.banner.src=imgArr[counter]
     counter++;
     if (counter > imgArr.length)
     {
          counter = 0
     }
}

</SCRIPT>
<p><img border="0" src="img1.gif" id="banner"></p>
======================================================

check this for more details

http://www.experts-exchange.com/Web/Web_Languages/ASP/Q_21056453.html

neeraj523
0
 
LVL 16

Author Comment

by:golfDoctor
ID: 11714927
neerja- No, I meant shuffle, one per page.  Thanks.
0
 
LVL 16

Author Comment

by:golfDoctor
ID: 11714933
Thanks, that works well.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Leverage browser caching 2 55
Adding items to html ul from on server side. 4 55
currencylayer API intergrate to ASP 25 66
Auto Submit on dropdown box 3 56
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

896 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

14 Experts available now in Live!

Get 1:1 Help Now