How to change content when page is refreshed (Full Version)

All Forums >> [Web Development] >> General Web Development



Message


mb716 -> How to change content when page is refreshed (5/14/2008 13:11:30)

I want to have pictures change each time the default page is brought up. I can't find a solution on the web, so I came here. I knew I would get great advice. So, any ideas?




Tailslide -> RE: How to change content when page is refreshed (5/14/2008 13:16:05)

There are different ways of doing this depending on your skills and your server-side technology.

You could use Javascript or PHP for instance.




mb716 -> RE: How to change content when page is refreshed (5/14/2008 13:17:07)

Ok, can you give me an idea of where to go for the script?




Tailslide -> RE: How to change content when page is refreshed (5/14/2008 13:18:29)

Which do you want? Javascript or PHP?




mb716 -> RE: How to change content when page is refreshed (5/14/2008 13:21:18)

Which is better? I've got more experience in using Javascript, but have a couple on that page already. Would one more interfere? Go ahead and give me the php. I'll figure it out.




Tailslide -> RE: How to change content when page is refreshed (5/14/2008 13:23:50)

I'd say PHP would be more reliable if you have it on your web server as it's done server-side and doesn't rely on users having JS switched on or security settings blah blah blah.

Here's a simple one: http://www.alistapart.com/articles/randomizer/

That will pull random images from a folder and display in a <img> tag in the markup. Let me know if you need a random background image from the CSS as I have that somewhere too.




mb716 -> RE: How to change content when page is refreshed (5/14/2008 13:30:14)

Thanks Tailslide! It looks easy enough. I will give it a go. I knew Outfront was the place to go.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875