Jquery Ajax Works In Chrome, But Not In Firefox Or Safari
I implemented ajax request with jQuery. This is the code: //initialize value, nameValue, emailValue $.ajax({ url: 'getPOST.php', type: 'POST', data: { 'id': value, '
Solution 1:
Got to long for a comment but try excluding jquery and try simple xhr/fetch to see if it works (maybe you will get a other understandable error if you try fetch)
fetch('getPOST.php', {
method: 'POST',
headers: {'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'}
body: 'id=0&name=bob&email=bob%40localhost'
}).then(res => console.log(res))
(safari don't have fetch so try in firefox)
The only thing i can thing of is that you are posting cross origins... Are you posting to the same domain? Must be a network error/restriction cuz your code is valid
Post a Comment for "Jquery Ajax Works In Chrome, But Not In Firefox Or Safari"