Random Number Generator Pop Up Error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chadhill
    New Member
    • Aug 2008
    • 1

    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.h idden.value = Math.floor(Math .random()*100);
    alert(document. form.hidden.val ue);
    }
    </script>[/HTML]
    I call this script with onload="MM_call JS('window.onlo ad = 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
    Last edited by gits; Aug 27 '08, 07:42 PM. Reason: added code tags
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    What does the error message say? Does it only occur in IE or on other browsers too?

    Comment

    Working...