Help - Search - Members - Calendar
Full Version: Refresh help
HTMLHelp Forums > Programming > Client-side Scripting
ssj4sunny
Hi there guys! I have a new website up and running here Chong Clothing.

As you can see at the top there is a quote from Tommy Chong. Basically I want that quote to change everytime someone refreshes the page or when someone enters the page. I want the quote to change at random.

Is there a way to do this?

Thank you so much,

Sunny
pandy
Google the language you want to use for this + random + quote . For example http://google.com/search?q=JavaScript+random+quote .
kirank
QUOTE(ssj4sunny @ Oct 30 2009, 09:55 AM) *

Hi there guys! I have a new website up and running here Chong Clothing.

As you can see at the top there is a quote from Tommy Chong. Basically I want that quote to change everytime someone refreshes the page or when someone enters the page. I want the quote to change at random.

Is there a way to do this?

Thank you so much,

Sunny


yes u can do that , if this text is comming from database then u can using query u can display random text using
below query u can do that
CODE

sql = select bannertext from chongclothing order by newid()  


every time it will generate new banner text

or

you can store all the such text in array and using Random() function in asp / php you can read
text[i] - where i is random no
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.