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
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    cannot submit only 1 inner form

    Working Code
    Code:
    <form action=outer.cgi method=post name=outer>
    <tr> <td>....</td> </tr> 
    <!--some elements like this in outer form -->
    
    <table border="1">
       <tr>
          <td> Parameter </td>
          <td> Description </td>
          <td> Value </td>
      </tr>
    
    <form name="inner1" method="POST" action="inner1.cgi">
      <tr>
          <td>Machine name</td>
          <td>specify machine name</td>
          <td><input type="text" name="args1" value=""></td>
       </tr>
       <input type="hidden" name="idx" value="8"><input type="hidden" name="new" value="1">
    </form>
    
    <!-- If "form below" is there,then only "form above" submits -->
    <form name="inner1" method="POST" action="inner1.cgi">
    <input type="hidden" name="idx" value="8"><input type="hidden" name="new" value="1">
    </form>
    
    </table>
    <!-- outer form ends -->
    </form>
    Not working code
    Code:
    <form action=outer.cgi method=post name=outer>
    <tr> <td>....</td> </tr> 
    <!--some elements like this in outer form -->
    
    <table border="1">
      <tr>
        <td> Parameter </td>
        <td> Description </td>
        <td> Value </td>
      </tr>
    
    <form name="inner1" method="POST" action="inner1.cgi">
    <tr>
      <td>Machine Name</td>
      <td>specify target machine name</td>
      <td><input type="text" name="args1" value=""></td>
    </tr>
    <input type="hidden" name="idx" value="8"><input type="hidden" name="new" value="1">
    </form>
    
    <!-- I want this code to work. Dont want another same name form here -->
    
    <script>
           document.inner1.submit();
    </script>
    </table>
    my XSL file is producing this HTML code depending on my XML file.
    meas in prototypical view,
    Code:
    <form name=outer1>
      <form name=form1></form>
      <form name=form2></form>
       <script>
            document.form2.submit();
       </script>
    <form>
    <!-- Then form2 submits.but if I remove form1 line,then form2 doesn't submit. -->
    <!-- I dont want form1 there in picture..Cannot I submit form2 without any form in between 'outer1' and 'form2' is my question -->

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Validate your code and fix all erros in your markup! Your nesting of tags is incorrect.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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