[QUOTE=Spency;1294201]Hello, I'm having issues trying to make an alphabetic randomizer... specifically, it needs to only randomize the order of 2 letters each time the page is reloaded.
Here is the code I currently have in place, but when I try and load it in my browser I get a blank screen.
Code:
<script type="text/javascript">
//<![CDATA[
<!--
Long.toHexString(Double.doubleToLongBits(Math.random()));
//
//-->
//]]>
</script>
That code is JAVA, not Javascript. Java and Javascript are entirely different programming languages, in spite of the confusingly similar names. Rather like Austria and Australia! Ask a mod to move this thread to the right forum.
If all you want to do is randomize the order of two letters on page load, then
Code:
<script type = "text/javascript">
var twoletters = "XY"
var now = new Date().getSeconds(); // returns 0-59
if (now%2 == 0) { // even number
twoletters = "YX";
}
alert (twoletters);
</script>
Quizmaster: The small primates called lemurs are native to which large island off the coast of Africa?
Contestant: Argentina.