469,272 Members | 1,413 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,272 developers. It's quick & easy.

Random Number Generator Pop Up Error

Hi,

I have a html form on a web page that I am using a hidden field that has a random number inserted by javascript.

[HTML]
<script>
function genRandomNumber() {
document.form.hidden.value = Math.floor(Math.random()*100);
alert(document.form.hidden.value);
}
</script>[/HTML]
I call this script with onload="MM_callJS('window.onload = genRandomNumber();

It works fine and the random number is inserted in the hidden field...but when the page loads a IE pop up error box shows up with the random number and on OK box.

Is there a way to keep this error box from showing up? I am using IE 7.

Thanks for any input
Aug 27 '08 #1
1 1200
acoder
16,027 Expert Mod 8TB
What does the error message say? Does it only occur in IE or on other browsers too?
Aug 28 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Brandon Michael Moore | last post: by
16 posts views Thread by Jason | last post: by
3 posts views Thread by Joe | last post: by
70 posts views Thread by Ben Pfaff | last post: by
5 posts views Thread by Peteroid | last post: by
104 posts views Thread by fieldfallow | last post: by
12 posts views Thread by Jim Michaels | last post: by
20 posts views Thread by Robbie Hatley | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.