#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2005
    Posts
    31
    Rep Power
    10

    Submit a form inside of another form


    I have a script that will submit a form when it is by itself, but when I put it inside of another form, the script dosen't work. Here is the script I have:

    Code:
    function confirmation() {
    	var answer = confirm("submit?")
    	if (answer){
    		document.z.bleh.submit();
    	}
    	else{
    	}
    }
    then here is my HTML code

    Code:
    <form name="z" action="bbbb.php" method="post">
    <form name="bleh" action="zzz.php" method="post">
    <input type="button" onclick="confirmation()" value="submit?">
    </form>
    </form>
    I don't know javascript very well, so it has to be where my code is: document.z.bleh.submit();

    thanks for the help
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2003
    Posts
    508
    Rep Power
    17
    You cannot have a form inside another form. What are you trying to do?

IMN logo majestic logo threadwatch logo seochat tools logo