[Javascript] Javascript to change include filename
Del Wegener
del at delweg.com
Wed Jan 21 12:35:34 CST 2009
Good Day;
One of my websites currently contains the following div
<div id="blendme">
<!--#include file="pic3.txt"-->
</div>
My client wants to have 12 - 20 different pic_ordernn files. A random
number generator should be use decide which file to include (pic1.txt,
pic2.txt, pic3.txt, ..., or pic15.txt).
I can write code to randomly create/select one of the filenames but how do I
insert that filename in the above include statement?
It seems to me the include is serverside and my JS is client side.
Can that filename be a variable whose value is determined when the page is
loaded?
Is this a PHP job?
Thanks for all your suggestions.
Del
More information about the Javascript
mailing list