In my setup, I have a Fancybox that displays a dialog along with a button for interaction. What I am trying to achieve is opening another fancybox either on top of the existing one or at a different position on the screen without losing the original fancybox. Both fancyboxes need to be filled using an ajax request. Is this scenario actually possible? Because so far, my attempts resulted in losing the initial fancybox...
Below is the code snippet I have been working with:
$.fancybox.showActivity();
$.ajax({
type : "POST",
cache : false,
url : "../testservlet?select=1,
data : $(this).serializeArray(),
height : 600,
width : 800,
padding : 30,
showCloseButton : true,
success : function(data) {
$.fancybox(data);
}
});
$.fancybox.showActivity();
$.ajax({
type : "POST",
cache : false,
url : "test?select=2,
data : $(this).serializeArray(),
padding : 30,
showCloseButton : true,
success : function(data) {
$.fancybox(data);
}
});