celestun
09-28-2011, 02:14 AM
Hi, I was hoping someone might have a solution to randomizing a URL in javascript... in this case for an embedded Simpleviewer link?
At the moment the link is http://timperceval.com/guiran/intro1/ but I would like to have the site randomly choose from four URLs.
The embedded code is as follows:
<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="http://timperceval.com/guiran/intro1/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.baseURL = "http://timperceval.com/guiran/intro1/";
simpleviewer.ready(function () {
simpleviewer.load("sv-container", "100%", "100%", "000000", true, flashvars);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED --
Any ideas would really help!
Thanks,
Tim
At the moment the link is http://timperceval.com/guiran/intro1/ but I would like to have the site randomly choose from four URLs.
The embedded code is as follows:
<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="http://timperceval.com/guiran/intro1/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.baseURL = "http://timperceval.com/guiran/intro1/";
simpleviewer.ready(function () {
simpleviewer.load("sv-container", "100%", "100%", "000000", true, flashvars);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED --
Any ideas would really help!
Thanks,
Tim