|
Posted by cwdjrxyz on 02/06/07 22:01
On Feb 5, 11:09 am, "ipy2006" <ipyasa...@gmail.com> wrote:
> Other than the JavaScript of timing and rotating images every few
> seconds or minutes, is there a way to uniquely load a different
> picture every time a browser open a page?
> Thanks,
> yip
You actually can use javascript to load an image at random every time
the page is opened or refreshed. You can also add noscript to select a
single image to display if script is turned off on the viewing
browser. If you have access to php on the server, a php script can be
used to do the same thing, and it can not be turned off by the viewer.
See an example at http://wineFAQ.hostexcellence.com with the external
script at http://wineFAQ.hostexcellence.com/wine/rand2.js . The main
thing to watch is that the array used will tolerate no errors. Just a
single missing or extra character in the array can completely kill the
script.
Navigation:
[Reply to this message]
|