javascript function ajax does not work in android 4.1 -
i have javascript code works except in native browser in android 4.1
jquery-1.10.2 used well.
the function following:
function ajax(url, successmethod, params){ $.ajax({ type: 'get', url: url, data: params, datatype: 'json', timeout: 300, success: successmethod, error: function(xhr, type){ alert('ajax error!') } }); }
i don't know why javascript doesn't work in android 4.1 native browser.
i changed function's name , code running now:
function callrequest(url, successmethod, params){ $.ajax({ type: 'get', url: url, data: params, datatype: 'json', timeout: 300, success: successmethod, error: function(xhr, type){ alert('ajax error!') } }); }
solved: problem function name ajax. changed , worked fine.
Comments
Post a Comment