Hi I have a code for posting on my site and it works perfectly in safari, but in firefox not. I don't know the problem, because the code is very simple ... Here the code:
<input type="text" placeholder="mmm..." class="bar" name="txt" /> <input type="hidden" value="" name="map" /> <button onclick="post('2')">send</button> <div id="prueba"></div> <script src="http://code.jquery.com/jquery-latest.js"></script> <script> function post(id) { var txtvalue = document.getElementsByName('txt')[0].value; if (document.getElementsByName('map')[0]) { var mapv = document.getElementsByName('map')[0].value; } else { var mapv = ""; } $('#prueba').html('txt:' + txtvalue + '<br>map:' + mapv); $.ajax({ type: "POST", url: "http://m2s.es/app/api/connect/chat.php", data: { txt: txtvalue, map: mapv, id: id }, dataType: 'text', beforeSend: function() { console.log('connecting...') }, complete: function() { console.log('procesing...') }, success: function(result) { console.log(result); }, error: function(XMLHttpRequest, textStatus, errorThrown) { console.error(textStatus); } }) } </script> For that the PHP process the post, you must be logged in to the http://m2s.es/app, but still in firefox will give error in the console (with login or not) and not as in safari, if you don't login, it will say in the console: 'not Login'