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
Post a Comment