jquery - Ajax Form is not working on IE -
$(document).ready(function () { $('#upload_photo').click(function () { $('input[type=file]#upload_myphoto').click(); }); }); $(document).ready(function () { $("input[type=file]#upload_myphoto").change(function () { $("#node_profilepic").prop('src', 'loader.gif'); $("#upload_profilepic").submit(); }); }); $(function () { $('#upload_profilepic').ajaxform({ beforesubmit: showrequest, success: function (responsetext, statustext) { alert(responsetext); //$("#node_profilepic").prop('src',responsetext); $('.iframe').click(); }, error: ajaxerror }); }); function showrequest(formdata, jqform, options) { //alert(formdata); var querystring = $.param(formdata); // alert(querystring); return true; } function ajaxerror() {}
this code used uploading image using ajax call , work on browser except ie. please tell me can call ajax form using ie
try use settimeout()
ie
like,
$(function(){ $('input[type=file]#upload_myphoto').change(function () { settimeout(function(){ $("#node_profilepic").prop('src', 'loader.gif'); $("#upload_profilepic").submit(); },100);// can try 0 in place of 100 }); });
read inconsistent change event in ie , jquery: change event input file on ie
Comments
Post a Comment