4

I have written code that form checks and if all is good passes user input data to ajax so that the database table can be written to. While trying various browsers I am successful at writing to the table with chrome and iexplorer but nothing is written in firefox and no php errors are thrown.

Can anyone see any reason why the following ajax call is not successful with firefox?

$.ajax({
        type: "POST",
        url:"ajax/ajax_repSub.php",
        data: {tDate: tDate, tSpecies: tSpecies, tSqrNum:tSqrNum, tLat:tLat, tLng:tLng, tCond:tCond, tNum:tNum, tHab:tHab, tBehav:tBehav, tReg: tReg, tStage: tStage},
        dataType: "text",
        cache: "true",
        success: function(msg,string,jqXHR){
            $("#results").html(msg+string+jqXHR);
        }
    });
Christopher Law
  • 189
  • 1
  • 1
  • 7
  • To be able to help you, we would need a little more information. Are there any checks done by your PHP? Is the ajax correctly sent? You can check using your browser debugger. Maybe it's code that sets the variables before also... As it is now, this question is not answerable. – Salketer Mar 25 '16 at 07:15
  • my php script doesnt do any checks, that is handled by java on the html page that invokes the php scrip. No errors thrown on the browser debugger. Not sure how I can check to see if the ajax file is getting the data being sent. As the ajax script is called and the webpage refreshes, I wouldnt be able to see the echo results. I am new to this so please bare with me and offer any advice. – Christopher Law Mar 25 '16 at 07:25
  • 1
    this will help : [http://stackoverflow.com/questions/18274383/ajax-post-working-in-chrome-but-not-in-firefox](http://stackoverflow.com/questions/18274383/ajax-post-working-in-chrome-but-not-in-firefox) – SnakeFoot Mar 25 '16 at 07:31
  • 1
    or this : [http://stackoverflow.com/questions/13148483/ajax-post-being-aborted-by-firefox-not-seen-in-chrome-or-ie](http://stackoverflow.com/questions/13148483/ajax-post-being-aborted-by-firefox-not-seen-in-chrome-or-ie) – SnakeFoot Mar 25 '16 at 07:33
  • async:false, worked thank you – Christopher Law Mar 25 '16 at 07:38

0 Answers0