?
Solved

Shuffle banners

Posted on 2004-08-04
4
Medium Priority
?
604 Views
Last Modified: 2012-05-05
How can i shuffles client banners on my site?
0
Comment
Question by:golfDoctor
[X]
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
  • 2
4 Comments
 
LVL 31

Accepted Solution

by:
alorentz earned 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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 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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

770 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