Answer the question
In order to leave comments, you need to log in
How to correctly set the action?
if i don't do it like this
$.ajax({
url: myajax.url,
type: 'POST',
cache: false,
contentType: false,
processData: false,
data: data,
data: {
action: 'request',
phone: phone,
email: email,
surname: surname,
name: name,
days: days,
money: money,
},
}).done(function(data){
});
}
if( typeof files == 'undefined' ) return;
var data = new FormData();
$.each( files, function( key, value ){
data.append( key, value );
});
$.ajax({
url: myajax.url,
type: 'POST',
cache: false,
contentType: false,
processData: false,
data: data,
}).done(function(data){
});
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question