Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need to use this same random imag

Status
Not open for further replies.

rhondabrabbin

Technical User
Joined
Nov 11, 2002
Messages
87
I need to use this same random image ( script/or change it to use in an html site. I need the same images to randomize on another site.
What is the easiest was to do this? I don't know php but I do know html.
Thank you
 
Do you have access to the PHP script code for that page and want advice on copying it to another site?

Or do you not have access to the script code for that page and want to duplicate its functionality on another site?

Want the best answers? Ask the best questions: TANSTAAFL!!
 
Well I have the same site that is identical but it is all in html I need to make the images on the home page randomize on the html site too, I have both sites. I just didn't know how to extract the code from the php home page and put it in the html home page so it will work the same.
 
HTML won't do random images for you, it's a static language.

Your only options outside of server side scripting (like PHP) is client side scripting... so you could use javascript as the client side scripting language to choose which image is shown... pretty good solution, but a small minority who disables javascript won't see them... that's fine you can just give those people a static image.


-Rob
 
how would I change the script to Javascript?
 
Google for "javascript random image" or check out the javascript forum.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top