Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Banned
    Join Date
    Jun 2012
    Posts
    81
    Thanks
    7
    Thanked 0 Times in 0 Posts

    JavaScript not working inside an iframe

    I am using a JavaScript form validator inside an iframe, and it doesn't appear to be working:

    Code:
    <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?
    Last edited by Phalanxer; 06-30-2012 at 12:39 PM.

  • #2
    Banned
    Join Date
    Jun 2012
    Posts
    81
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Its ok. I just had a missing bracket!

    Fair well everyone!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •