javascript - Add dynamic input field in ajax -


is there way put dynamic input inside ajax? using hayageek jquery file upload. wanted add input hidden inside form upload replacing file. appreciated.

the div handles upload: <div id="replacefile">upload</div>

i wanted put: <input type="text" name="replace">

$("#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     }   }); 

$("#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           var input=$('<input type="text" name="replace">');         $('#replacefile').find('form').append(input);     },     onerror        : function() {      // error     }   }); 

Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -