var name=$('#element_name').val(); var ofile=document.getElementById('image').files[0]; var formdata; if(FormData) { formdata=new FormData(); formdata.append("image",ofile); } formdata.append("element_name",name); $.ajax({ url:'elements/save_elements', data:formdata, type:'POST', success:function(res) { $('#response').html(res); }, error:function(xhr,rrr,error) { alert(error); } });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)