View Full Version : JavaScript not working inside an iframe

06-30-2012, 01:36 PM
I am using a JavaScript form validator inside an iframe, and it doesn't appear to be working:

<SCRIPT type="text/javascript">
function validateForm() {
if (document.forms["form"]["wait"].value == "") {
alert ("No wait specified.");
return false;
<FORM method="post" name="form" onsubmit="return validateForm()">
WAIT: <INPUT name="spinwait" type="text" value="">
<INPUT type="submit" value="OK">

Does JavaScript not run in an iframe or is there just something wrong with my code?

06-30-2012, 01:41 PM
Its ok. I just had a missing bracket!

Fair well everyone!