Answer the question
In order to leave comments, you need to log in
How to correctly form an AJAX request under Fancybox 3?
There is such a function that displays the necessary data in the jqueryui modal window:
function ShowProfile( name, url, allowedit ){
if (dle_user_profile == name && document.getElementById('dleprofilepopup')) {$('#dleprofilepopup').dialog('open');return false;}
dle_user_profile = name;
dle_user_profile_link = url;
ShowLoading('');
$.get(dle_root + "engine/ajax/controller.php?mod=profile", { name: name, skin: dle_skin, user_hash: dle_login_hash }, function(data){
HideLoading('');
ShowPopupProfile( data, allowedit );
});
return false;
};
function ShowProfile( name, url, allowedit ){
if (dle_user_profile == name && document.getElementById('dleprofilepopup')) {$('#dleprofilepopup').dialog('open');return false;}
dle_user_profile = name;
dle_user_profile_link = url;
ShowLoading('');
$.get(dle_root + "engine/ajax/controller.php?mod=profile", { name: name, skin: dle_skin, user_hash: dle_login_hash }, function(data){
HideLoading('');
$.fancybox.open({
src: "data",
type: "ajax",
ajax: {
settings: {
type: "POST",
data: {
name: name,
myparam2: "value2"
}
}
}
});
});
return false;
};
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