Answer the question
In order to leave comments, you need to log in
How to return ajaxSubmit data?
When using ajaxSubmit ran into some difficulties.
The code doesn't work. Possibly a syntax error. I'm trying to return data to an element with the class main_background. The function is called but no data is returned.
Where is the mistake and how to fix it?
$('.graph_control_settings').on('change', function(){
$("#graph_control_form").ajaxSubmit({url: 'actions.php', type: 'post',success: $('.main_background').html(data)});
return false;
});
Answer the question
In order to leave comments, you need to log in
success must be represented by an executable function, since it is a callback to the execution of sending data, in other words:
success: function(data){
$('.main_background').html(data);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question