Random
09-30-2001, 09:36 PM
<script language="javascript">
pic=Math.round(Math.random()*2)
if(pic==1){var imag="<img src="splashes/splash.gif" width="500" height="500" usemap="#Map" border="0"><map name="Map"><area shape="rect" coords="0,0,250,501" href="http://www.static2k.com/index.shtml"><area shape="rect" coords="250,2,554,541" href="http://www.static2k.com/karph/index.shtml"></map>"}
if(pic==2){var imag="<img src="splashes/splash1.gif" width="500" height="500" usemap="#Map" border="0"><map name="Map"><area shape="rect" coords="0,0,250,501" href="http://www.static2k.com/index.shtml"><area shape="rect" coords="250,2,554,541" href="http://www.static2k.com/karph/index.shtml"></map>"}
document.write(imag)
</script>
any ideas why it doesnt work? it should just show up a random image bewtween 1 and 2 for now, but i will add more later...
pic=Math.round(Math.random()*2)
if(pic==1){var imag="<img src="splashes/splash.gif" width="500" height="500" usemap="#Map" border="0"><map name="Map"><area shape="rect" coords="0,0,250,501" href="http://www.static2k.com/index.shtml"><area shape="rect" coords="250,2,554,541" href="http://www.static2k.com/karph/index.shtml"></map>"}
if(pic==2){var imag="<img src="splashes/splash1.gif" width="500" height="500" usemap="#Map" border="0"><map name="Map"><area shape="rect" coords="0,0,250,501" href="http://www.static2k.com/index.shtml"><area shape="rect" coords="250,2,554,541" href="http://www.static2k.com/karph/index.shtml"></map>"}
document.write(imag)
</script>
any ideas why it doesnt work? it should just show up a random image bewtween 1 and 2 for now, but i will add more later...