title: submit form data into iframe via post [file upload]
body: <p>UGH.</p>
  
  <p>Hi.</p>
  
  <p>I have a form. I'd like to know how/if I could submit this form to an iFrame that has the page that will handle the file upload/naming.</p>
  
  <p>If I try even something simple like post an input/text to the form, nothing happens (the handler is set to echo the $_POST). I have tried setting the iframe name/id et. al. and setting the form target to the respective iframe name/id. When I hit submit, the iframe just sits there like a dummy. WTF am I doing wrong?</p>
  
  <p>Thx.</p>
  
  <pre><code>&lt;form action="/clients/testAddTrans/&lt;?=$clientID?&gt;" id="reportEdit" class="EditName" method="POST" target="transFrame"&gt;
      &lt;div class="inputDiv"&gt;
          &lt;span class="inputLabel"&gt;Description:&lt;/span&gt;
          &lt;span class="textInput"&gt;
              &lt;input type="text" id="transDesc" name="transDesc" value="" size="40" class=""/&gt;
          &lt;/span&gt;
      &lt;/div&gt;
      &lt;div class="inputDiv"&gt;
          &lt;span class="inputLabel"&gt;Date:&lt;/span&gt;
          &lt;span class="textInput"&gt;
              &lt;input type="text" id="date" name="transDate" value="" size="40" class=""/&gt;
          &lt;/span&gt;
      &lt;/div&gt;
      &lt;div class="inputDiv"&gt;
          &lt;span class="inputLabel"&gt;File:&lt;/span&gt;
          &lt;span class="textInput"&gt;
              &lt;input type="file" id="file" name="transFile" value="" size="40" class=""/&gt;
          &lt;/span&gt;
      &lt;/div&gt;
      &lt;input name="name_id" type="hidden" value="&lt;?=$itemid?&gt;" /&gt;
      &lt;input type="submit" value="Submit" name="submit"/&gt;
      &lt;input type="button" class="secondaryAction" onclick="hideOverDiv()" value="Close"/&gt;
      &lt;div id="overDivNotice" class="overDivNotice" style="display:none"&gt;&lt;/div&gt;
      &lt;iframe action="/clients/testAddTrans/&lt;?=$clid?&gt;" id="transFrame" name="transFrame" style=""&gt;&lt;/iframe&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Generated html via firebug:</p>
  
  <pre><code>    &lt;div class="content" id="overDivContent"&gt;&lt;div class="inputDivContainer"&gt;
    &lt;fieldset class="inputOverDiv" id="tfa_Names"&gt;
   &lt;legend&gt;&lt;b&gt;Add Transmittal:&lt;/b&gt;&lt;/legend&gt;
    &lt;div class="data"&gt;&lt;form target="transFrame" method="POST" class="EditName" id="reportEdit" action="/clients/testAddTrans/fsdf1556"&gt;&lt;div class="inputDiv"&gt;&lt;span class="inputLabel"&gt;Description:&lt;/span&gt;&lt;span class="textInput"&gt;&lt;input type="text" class="" size="40" value="" name="transDesc" id="transDesc"/&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="inputDiv"&gt;&lt;span class="inputLabel"&gt;Date:&lt;/span&gt;&lt;span class="textInput"&gt;&lt;input type="text" class="" size="40" value="" name="transDate" id="date"/&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="inputDiv"&gt;&lt;span class="inputLabel"&gt;File:&lt;/span&gt;&lt;span class="textInput"&gt;&lt;input type="file" class="" size="40" value="" name="transFile" id="file"/&gt;&lt;/span&gt;&lt;/div&gt;&lt;input type="hidden" value="121" name="name_id"/&gt;
    &lt;/form&gt;&lt;br/&gt;
    &lt;div align="center" class="actions" id="overDivActions"&gt;
     &lt;input type="submit" name="submit" value="Submit"/&gt;
     &lt;input type="button" value="Close" onclick="hideOverDiv()" class="secondaryAction"/&gt;
    &lt;/div&gt;
    &lt;div style="display: none;" class="overDivNotice" id="overDivNotice"&gt;
    &lt;/div&gt;&lt;/div&gt;
  
  
    &lt;iframe style="" name="transFrame" id="transFrame"&gt;tyh&lt;/iframe&gt;
    &lt;/fieldset&gt;
    &lt;/div&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I don't know why it is putting the <code>&lt;/form&gt;</code> tag where it is.. It is supposed to be after the iframe, but whatever. Does that even matter? Is the iframe supposed to be inside the form?</p>