Solved

Shuffle banners

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

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 …
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/…
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 …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

776 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