this is my js code:
$(document).ready(function (e) {
$("#f1").on('submit',(function(e) {
var ActionType = getParameterByName('t');
var projId = getParameterByName('pj');
var QsId = getParameterByName('s');
var urlString = "uploader.php?t=";
urlString +=ActionType;
urlString +="&pj=";
urlString +=projId;
urlString +="&s=";
urlString +=QsId;
//e.preventDefault();
$.ajax({
url: urlString,
type: "POST",
data: new FormData(this),
contentType: false,
cache: false,
processData:false,
success: function(data)
{
//alert(callback); //Need to be changed
}
});
}));
});
//This function gets the parameter in the URL (GET) by name
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
Firebug:
Accept / Accept-Encoding gzip, deflate Accept-Language en-US,en;q=0.5 Content-Length 1198 Content-Type multipart/form-data; boundary=---------------------------266932244324698 User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 X-Requested-With XMLHttpRequest
I really can't understand the problem. Everything works perfect in Chrome and IE but not in FF
EDIT:
Aucun commentaire:
Enregistrer un commentaire