Have this extremely simple code and cannot figure out where the error is that's keeping it from running? <script type="text/javascript"> /* <![CDATA[ */ function wLoop(count) { count = parseInt(count); if(count == 10){ document.alert("number is too large"); } } /* ]]> */ </script> </head> <body> <form name="loops"> <p>Enter a number between 1 - 9999</p> <input name="wLoopText" type="text"/><br/> <input type="button" value="While Loop" onclick="wLoop(document.loops.wLoopText.value)" name="wLoopButton"/><br/> <br/> <p>Enter a number between 1 - 9999</p> <input name="fLoopText" type="text"/><br/> <input type="button" value="For Loop" onclick="fLoop()" name="fLoopButton"/><br/> </form> /* ]]> */ </script> Code (markup): Can anyone else see this error that i'm guessing is extremely obvious?
Remove document from this line: document.alert("number is too large"); There are no opening tags for this at the end. /* ]]> */ </script> Hope that helps
omg...! lol...yeah that document.alert needed to be a window.alert....thanks for pointing me in the right spot!