Random text and images

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Jun 2007
Posts: 2
Reputation: TonyRad is an unknown quantity at this point 
Solved Threads: 0
TonyRad TonyRad is offline Offline
Newbie Poster

Random text and images

 
0
  #1
Jun 7th, 2007
I've got a client who wants their header to contain random changing images and random changing text. I have a script written that is changing images and it works great. I've also found scripts that randomize images and text.

Here's the catch though, I need the text and images NOT linked. So that text_a could end up showing at the same time as image_1 or image_6.

The other catch is that the text needs to overlap the image. Not be above or below.

I have no idea how to do this. I'm not even positive I can do this with JS. If anybody has any idea of a script I could use or an app or anything to accomplish this that would be awesome.

Thanks!
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 2
Reputation: TonyRad is an unknown quantity at this point 
Solved Threads: 0
TonyRad TonyRad is offline Offline
Newbie Poster

Re: Random text and images

 
0
  #2
Jun 7th, 2007
Oh yeah, and the changes need to be timed and not based on page open.
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,629
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 468
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: Random text and images

 
0
  #3
Jun 7th, 2007
As for the randomness, you can store the text in a Javascript array. The same goes with images. Then generate two random numbers. If they are not equal display the combination, and if equal, then generate another set within the specified bounds.

The positioning is more of CSS + XHTML than Javascript.
I don't accept change; I don't deserve to live.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC