WeLoveCSS Logo
Home Profile Members Search Rules Help New Posts



WeLoveCSS > WEB DESIGN > Graphics & Multimedia > New Image For Each Reload WITHOUT javascript

Reply
  Thread Tools Display Modes
Old 20th June 12, 09:57 AM   #1
Sacharissa
WLC Member
 
Sacharissa's Avatar
 
Join Date: Mar 2011
Location: England
Posts: 2
Default New Image For Each Reload WITHOUT javascript

I don't have any coding to show you because I'm not even sure if this can be done. I want my splash page to show a different image from a pre-created set each time the page is loaded or reloaded. I've found several ways of doing this using javascript but frankly I'm not very good with js. And to be honest I'm not fond of working with it. Besides too many people have it turned off - what would my splash page look like to them if it's based in js?

So, I'd like to know if there's a way of doing this using the basics of CSS and HTML.


Sacharissa
____________________


Mind over matter is all very well,
but what about the fact that the mind IS matter?
Sacharissa is offline   Reply With Quote
Old 20th June 12, 11:38 AM   #2
Jen
WLC Admin
 
Jen's Avatar
 
Join Date: Mar 2006
Posts: 489
Default Re: New Image For Each Reload WITHOUT javascript

PHP? I don't think html and css can reload image without javascript.

How about this:
http://demo.marcofolio.net/php_random_image_rotation/
Jen is offline   Reply With Quote
Old 20th June 12, 10:28 PM   #3
meesa
WLC Mod
 
meesa's Avatar
 
Join Date: Jul 2009
Location: Milky Way Galaxy
Posts: 3,710
Default Re: New Image For Each Reload WITHOUT javascript

If you just looking to randomize a picture, then create an array with all the URLs, then just use the random function to pick one of them.

So you might try something like:

PHP Code:
picArray[rand()%count(picArray)]
/*OR*/
picArray[rand(0,count(picArray))] 
__________________
Praise be to the Lord God for the ability to learn, the capability to analyze, and the time to help users on this forum.
meesa is offline   Reply With Quote
Old 21st June 12, 01:56 AM   #4
Jen
WLC Admin
 
Jen's Avatar
 
Join Date: Mar 2006
Posts: 489
Default Re: New Image For Each Reload WITHOUT javascript

There are two types - show new image or random images.
Jen is offline   Reply With Quote
Reply


Thread Tools
Display Modes
Linear Mode Linear Mode

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:10 PM.



Home | Advertise | Contact Us | Top
Home | Advertise | Contact Us | Top

Copyrightę 2006 WeLoveCSS.com. All Rights Reserved.
Powered by vBulletin Version 3.8.4 Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.