title: Add dynamic input field in ajax
body: <p>Is there a way to put a dynamic input inside ajax? I am using <a href="http://hayageek.com/docs/jquery-upload-file.php" rel="nofollow">hayageek</a> jquery file upload. I wanted to add an input as hidden inside the form upload for replacing a file. Any help would be much appreciated. </p>
  
  <p>The div that handles upload:
  <code>&lt;div id="replacefile"&gt;Upload&lt;/div&gt;</code></p>
  
  <p>I wanted to put: <code>&lt;input type="text" name="replace"&gt;</code></p>
  
  <pre><code>$("#replacefile").uploadFile({
      url            : newurl,
      fileName       : "myfile",
      returnType     : "json",
      dragDrop       : true,
      showFileCounter: false, // show numbered list of file
      allowDuplicates: false,
      multiple       : true, //allow multiple file upload
      showFileSize   : false, // show file size
      acceptFiles    : "doc,pdf",
      onSuccess      : function(files,data,xhr,pd) {
       // success 
      },
      onError        : function() {
       // error
      }
    });
  </code></pre>