I’m wanting to have a randomly generated number as the value of a tag each time I reload the page.
<form action=”whatever.asp” method=”post” name=”myform” onsubmit=”return ValidateForm(this)”>
<input type=”hidden” name=”v46″ value=”8773″>
</form>
I want to replace the [B]8773
What I need it to do is change in the actual code of the page each time the page reloads for a [B]hidden input value
The JavaScript I have so far is
[CODE]
<script type=”text/javascript”>
var n=9999;
onload=function(){
var rand = Math.ceil(Math.random()*n);
document.forms[0].elements[‘v46’].value=rand
}
</script>
Any Ideas? Any help would be greatly appreciated.