Solved

Shuffle banners

Posted on 2004-08-04
4
544 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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 …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

707 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

15 Experts available now in Live!

Get 1:1 Help Now