forum

Home / DeveloperSection / Forums / jQuery Ajax not work in Safari

jQuery Ajax not work in Safari

Anonymous User 4530 28-Sep-2013

I have function:

$(function () {

                    $('form').on('submit', function (e) {
                        $.ajax({
                            type: 'POST',
                            url: 'conf/send.php',
                            data: $('form').serialize(),
                            success: function () {
                                var form = document.getElementById("Form");
                                form.submit();
                            }
                        });
                        e.preventDefault();
                    });
               });

In FF, Chrome, Opera, IE work good. In Safari not work. Tried to add:

async: false,


$.ajaxSetup({
  type: 'POST',
  headers: { "cache-control": "no-cache" }
});

$.ajaxPrefilter(function (options, originalOptions, jqXHR) {
   options.data = jQuery.param($.extend(originalOptions.data||{}, {
     timeStamp: new Date().getTime()
   }));
});

It did not help that could be done?

Thanks in advance!


Updated on 28-Sep-2013
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By