[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Shuffle banners

Posted on 2004-08-04
4
Medium Priority
?
618 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

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 was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

656 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