java - jquery not working in IE11 -
these methods jquery seems not working in ie11, same code working in firefox , chrome.
function createcategory() { showloading(); $.post('<s:url value="/social/addeditcatsettings"/>',function(data){ hideloading(); $.prompt(data, { title: "add categories", buttons: { "add": true, "cancel": false }, submit: function(e,v,m,f){ if(v){ e.preventdefault(); saveupdatecat(); } } }); }); } function saveupdatecat(id) { var name = $('#catname').val(); var name_sanitized = name.replace(some scritp....); if(name !== name_sanitized) { showmessage('invalid input. please try again.',true); } else { var type = false; jsonobj = []; item = {} item ["name"] = name; item ["type"] = type; if(typeof id != 'undefined') { item ["id"] = id; }; if( btrim(name).length >0 ) { item["mytoken"]='<s:property value="#session.mytoken"/>'; $.post('<s:url value='/social/saveorupdatecatsettings' />',item,function(data){ if(data == 200) { hideloading(); $.fancybox.close(); if(typeof id != 'undefined') { showmessage('category updated successfully',false); } else { showmessage('category saved successfully',false); } loadtabcontent('managecats',profileid); } else { showmessage('please try again.',true); } }); } else { showmessage('error,please fill required (*) fields',true); hideloading(); } } }
after hell of wasting hour,
i replaced $post $ajax , modified lines accordingly, worked me.
Comments
Post a Comment