|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
dynamic background images
what is the easiest way to have the background image of a site change every time the same user visits the page (limit to 10).
|
|
#2
|
|||
|
|||
|
well,....you could use javascript. if you are using a database, you could track the backgrounds with the database. quite a few ways to do it actually
__________________
-- Jason |
|
#3
|
|||
|
|||
|
You can do it in 2 popular way:
01. JavaScript 01. JavaScript and CSS Follow the link below for an example: http://www.codelifter.com/main/java...ybackslide.html |
|
#4
|
|||
|
|||
|
thats what i needed to know. iwas not sure if that was a PHP thing or java script. i'll look into doing it with js.
Thanks Dave |
|
#5
|
|||
|
|||
|
you can do it with both php or javascript.
|
|
#6
|
||||
|
||||
|
I do it server-side - it's very simple
check out my sites: http://nightwatchmen.com (bkg img) http://www.boatplanner.com (header img) Briefly the pseudocode would be: Get folder containing the image Count All files while creating an array of filenames Generate a random number within the bounds of the number of files you have Return: the filename array with the random number (+1) as the selected index |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Programming Tools > dynamic background images |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|