...

View Full Version : JavaScript not working inside an iframe



Phalanxer
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;
}
</SCRIPT>
<FORM method="post" name="form" onsubmit="return validateForm()">
WAIT: <INPUT name="spinwait" type="text" value="">
<BR>
<INPUT type="submit" value="OK">
</FORM>


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

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

Fair well everyone!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum