开放的fancybox在另一个的fancybox阿贾克斯 [英] open fancybox over another fancybox ajax

查看:113
本文介绍了开放的fancybox在另一个的fancybox阿贾克斯的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个的fancybox这说明我的一些对话和一个按钮,单击。 当我点击这个按钮,我想打开另一个的fancybox在现有..或在屏幕上的其他位置,但我不想失去现有的fancybox。 我想通过一个Ajax请求,以填补他们两个.. 这可能吗? 因为是我的尝试导致失去原有的fancybox ..

我得到这个code:

  $ fancybox.showActivity();
                $阿贾克斯({
                    键入:POST,
                    缓存:假的,
                    网址:../testservlet?select=1,
                    数据:$(本).serializeArray()
                    高度:600,
                    宽度:800,
                    填充:30,
                    showCloseButton:真正的,
                    成功:功能(数据){
                        $ .fancybox(数据);
                    }
                });

$ .fancybox.showActivity();
                $阿贾克斯({
                    键入:POST,
                    缓存:假的,
                    网址:测试选择= 2,?
                    数据:$(本).serializeArray()
                    填充:30,
                    showCloseButton:真正的,
                    成功:功能(数据){
                        $ .fancybox(数据);
                    }
                });
 

解决方案

不幸的是,你不能有超过在同一时间一个的fancybox ......它被设计这样的。

您可能有现有的,但(当打开外部网页-via iframe-用的fancybox的话)的在另一个的fancybox ...或者你可以打开父页面上内的fancybox,创建你的幻想2 fancyboxes在同一页上。 点击此处查看详情

在另一方面,唯一的收藏夹我记得,支持多盒是 jQuery的工具叠加

I have a Fancybox which shows me some dialog and a button to click. When i click this button i want to open another fancybox over the existing one.. or on another position on the screen, but i dont want to lose the already existing fancybox. I want to fill both of them by an ajax request.. Is this possible? Because what i tried resulted in losing the original fancybox..

I got this code:

$.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);
                    }
                }); 

解决方案

Unfortunately you cannot have more than a single fancybox at the same time ... it has been designed like that.

You could have another fancybox inside of the existing one though (when open an external page -via iframe- with fancybox in it) ...or you could open that inner fancybox on the parent page, creating the illusion that you have two fancyboxes on the same page. Check here for more

On the other hand, the only lightbox I remember that supports multiple boxes is jQuery Tools Overlay

这篇关于开放的fancybox在另一个的fancybox阿贾克斯的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆