none
新窗口问题 RRS feed

  • 问题

  • <ItemTemplate>
            <asp:Button ID="SelectButton" CommandName="SelectGroup" CommandArgument=" <%# ((GridViewRow) Container).RowIndex %>" runat="server" Text="选择" CssClass=input /> </ItemTemplate>

    protected void GridView1_RowCommand(object sender,GridViewCommandEventArgs e)
        {
            if (e.CommandName == "SelectGroup")
            {
           
            }

    我在gridview里添加了一个模板列,放了一按钮,我希望点击这个按钮后打开一个新页面窗口,同时把栏目号传到新窗口,再在新窗口中读出所有group记录,比如管理员,超级管理员之类的,然后用checkbox选定以后把值提交回原来的页面,这种情况该如何实现,谢谢
    2010年3月9日 7:33

答案

  • 新窗口的方式很多,除了用 IFrame 还可以用 Div,原理都是一样的。即设置其 position 为 absolute,然后把 z-index 调的足够大。

    用 window.open() 的问题在于存在跨窗口脚本攻击的可能性。还有,新打开窗口的 QuieryString 也可能会泄露相关信息。

    使用哪一种方式您可以自定。
    Mark Zhou
    2010年3月10日 9:53

全部回复

  • 这个需要使用js来实现。
    使用js的BOM方法windows.open,来打开你定义的新页面
    比如
    var win=windw.open()

    这是你在原窗口就获得了新窗口的引用,这时候在新窗口提取出来的checkbox的值以数组的形式保存在全局变量中,在原来页面中引用的方法只需要

    win.checkValue
    然后再做对应解析进textbox的地方即可

    2010年3月9日 8:30
  • 可以考虑“页面内的新窗口”,即一个zindex很大的iframe,由于是在一个页面内,要好处理很多,用户体验也很不错。QQ空间就大量用了这种样式。

    还可以弹出对话框模式的子页面,也可以考虑。


    当然如果要求必须要一个新窗口的话也没办法,b/s模式下各个b之间是不相干的,楼上说的js是一种方法,另外就是子页面提交到服务器,原来的页面去定时提取这个数据,不过用户体验不大好。
    霸王
    2010年3月9日 10:01
  • 这个需要使用js来实现。
    使用js的BOM方法windows.open,来打开你定义的新页面
    比如
    var win=windw.open()

    这是你在原窗口就获得了新窗口的引用,这时候在新窗口提取出来的checkbox的值以数组的形式保存在全局变量中,在原来页面中引用的方法只需要

    win.checkValue
    然后再做对应解析进textbox的地方即可


    谢谢,我试试看,如果可以能不能说得详细点呢
    2010年3月9日 14:04
  • 可以考虑“页面内的新窗口”,即一个zindex很大的iframe,由于是在一个页面内,要好处理很多,用户体验也很不错。QQ空间就大量用了这种样式。

    还可以弹出对话框模式的子页面,也可以考虑。


    当然如果要求必须要一个新窗口的话也没办法,b/s模式下各个b之间是不相干的,楼上说的js是一种方法,另外就是子页面提交到服务器,原来的页面去定时提取这个数据,不过用户体验不大好。
    霸王

    呵呵,我还是先实现功能再说啊现在
    2010年3月9日 14:07
  • 新窗口的方式很多,除了用 IFrame 还可以用 Div,原理都是一样的。即设置其 position 为 absolute,然后把 z-index 调的足够大。

    用 window.open() 的问题在于存在跨窗口脚本攻击的可能性。还有,新打开窗口的 QuieryString 也可能会泄露相关信息。

    使用哪一种方式您可以自定。
    Mark Zhou
    2010年3月10日 9:53
  • 新窗口的方式很多,除了用 IFrame 还可以用 Div,原理都是一样的。即设置其 position 为 absolute,然后把 z-index 调的足够大。

    用 window.open() 的问题在于存在跨窗口脚本攻击的可能性。还有,新打开窗口的 QuieryString 也可能会泄露相关信息。

    使用哪一种方式您可以自定。
    Mark Zhou

    谢谢啊,我就是没有做过类似的功能,所以没什么头绪,能不能说得具体一点啊,或者稍微讲一样实现过程,帮帮忙啊
    2010年3月10日 13:14
  • 找个你认为功能能够满足要求的站点,把他页面拉下来就是最好的参考
    霸王
    2010年3月10日 13:36
  • 我自己写了一个弹出窗口的 JavaScript 库,分享出来给大家看看。但请不要将其应用于商业目的,否则对此行为而造成的法律责任由复制着全部承担。

    利用了 jQuery 1.4.1,调用方式:$("#element").xpopup(options),其中 options 请参考源代码。

    /// <reference path="Intellisense.js" />
    
    (function () {
        if (!window.xpopup) {
    
            window.xpopup = window$xpopup = function (element, command, options) {
                /// <summary>
                /// Makes a popup window using the content of the specified element.
                /// </summary>
                /// <param name="element" type="DomElement" domElement="true">The element to show as popup window.</param>
                /// <param name="command" type="String">The command string that could be the following values: "init", "show", "close" or "dispose".</param>
                /// <param name="options" type="Object">The options for the popup window.</param>
    
                if (!element) { return; }
    
                // Variable to contain the whole context for each popup.
                var data = null;
    
                // If no command provided, use "init" instead. This makes developers easy to use.
                if (!command) { command = "init"; }
                if (!options) { options = {}; }
                if (typeof command === "object") { options = command; command = "init"; }
    
                // Try to get data from existing. If this failed, will reconstruct a new space for data.
                data = $(element).data("xpopup");
    
                if (!data) {
                    data = {
                        attachElement: null,
                        popupContainer: null,
                        titleContainer: null,
                        buttonContainer: null,
                        contentContainer: $(element),
                        backgroundFilter: null,
                        command: command,
                        initialized: false,
                        isShowing: false,
                        css: {
                            popup: "ui-popup",
                            popupContainer: "ui-popup-container",
                            content: "ui-popup-content",
                            backgroundFilter: "ui-popup-background-filter",
                            popupButton: "ui-popup-button",
                            title: "ui-popup-title",
                            button: "ui-popup-button-container",
                            modal: "ui-popup-modal"
                        },
                        defaultCommandButtons: [{
                            text: "OK", value: "Ok", onclick: function () {
                                if ($.isFunction(data.options.onok)) { data.options.onok.apply(element, [data]); }
                                data.helper.processCommand("close");
                            }
                        }, {
                            text: "Cancel", value: "Cancel", onclick: function () {
                                if ($.isFunction(data.options.oncancel)) { data.options.oncancel.apply(element, [data]); }
                                data.helper.processCommand("close");
                            }
                        }],
                        options: {}
                    };
    
                    // Default options.
                    data.options = $.extend(true, {
                        // The width of the popup. Value: String.
                        width: "auto",
                        // The height of the popup. Value: String.
                        height: "auto",
                        // The DOM element that toggles the popup. Value: jQuery.
                        attachElement: null,
                        // The title of the popup dialog. Value: String.
                        title: null,
                        // The customized command buttons for the popup dialog. Value: Array of Object.
                        commandButtons: [],
                        // Indicating whether if popup dialog uses default command buttons (OK and Cancel). Value: Boolean.
                        useDefaultCommandButtons: true,
                        // Indicating whether if popup dialog displays the command buttons. Value: Boolean.
                        showCommandButtons: false,
                        // indicating whether if popup displays a title. Value: Boolean.
                        showTitle: false,
                        // Indicating whether if popup modal dialog allows keyboard shortcuts (ENTER and ESC). Value: Boolean.
                        useKeyboardShortcuts: true,
                        // Indicating whether if toggle control is automatically added with a down arrow indicator. Value: Boolean.
                        useDownArrow: false,
                        // Indicating whether if toggle control is registered with "click" event to show the popup. Value: Boolean.
                        registerClickEvent: true,
                        // Event handler for popup showing. Value: Function.
                        // If this function returns false, show operation will be terminated.
                        onshowing: null,
                        // Event handler for popup shown. Value: Function.
                        onshown: null,
                        // Event handler for popup closing. Value: Function.
                        // If this function returns false, close operation will be terminated.
                        onclosing: null,
                        // Event handler for popup closed. Value: Function.
                        onclosed: null,
                        // Event handler for click the "OK" (or press ENTER when settings allowed) button. Value: Function.
                        // This value only takes effect when "useDefaultCommandButtons" is set to true.
                        onok: null,
                        // Event handler for click the "Cancel" (or press ESC when settings allowed) button. Value: Function.
                        // This value only takes effect when "useDefaultCommandButtons" is set to true.
                        oncancel: null,
                        // Indicating the popup display mode. Value: String of "popup", "modal" or "dialog".
                        mode: "popup",
                        // Offsets to the X-axis when popup shows below the toggle element. Value: Integer.
                        offsetX: 0,
                        // Offsets to the Y-axis when popup shows below the toggle element. Value: Integer.
                        offsetY: 0,
                        // Location that the popup will be shown in the window. Value: Any of these strings.
                        // "topLeft", "topCenter", "topRight", 
                        // "middleLeft", "middleCenter", "middleRight",
                        // "bottomLeft", "bottomRight", "bottomCenter" and "default".
                        position: "default",
                        // Indicating whether if the popup is visible when scroll the window. Value: Boolean.
                        alwaysVisible: false,
                        // Indicating whether if the popup can be closed by press the ESC key in the non-modal dialog modes. Value: Boolean.
                        escapeToClose: false
                    }, options);
    
                    // Extend the CSS styles.
                    if (options.css) {
                        data.css = $.extend(true, data.css, options.css);
                    }
    
                    data.reload = false;
                    data.query = null;
                    data.attachElement = $(data.options.attachElement);
                } else {
                    data.command = command;
                    data.options = $.extend(true, data.options, options);
    
                    if (command === "query" && typeof options === "string") {
                        data.query = options;
                    }
    
                    // Force to reset layouts.
                    data.contentContainer = $(element);
                    data.reload = true;
                    data.attachElement = $(data.options.attachElement);
    
                    $(element).removeData("xpopup");
                }
    
                if (!data.helper) {
                    data.helper = {};
    
                    data.helper.initialize = function () {
                        /// <summary>
                        /// Initializes the new control.
                        /// </summary>
    
                        if (!data.initialized) {
                            if (!data.contentContainer) {
                                throw new Error('Property "popupContainer" must be set.');
                            }
    
                            if (data.contentContainer.length !== 1) {
                                throw new Error("The popup container must only be a unique element. Multi elements or null is not allowed.");
                            }
    
                            data.helper.resetOptions();
                            data.helper.initializeContainer();
    
                            if (data.options.attachElement) {
                                if (data.options.useDownArrow) {
                                    data.attachElement.append($("<span></span>").text("▼").css({ "font-size": ".60em", "margin-left": "8px" }));
                                }
    
                                if (data.options.registerClickEvent) {
                                    data.attachElement.click(function () {
                                        if (!data.isShowing) {
                                            data.helper.processCommand("show");
                                        } else {
                                            data.helper.processCommand("close");
                                        }
                                    });
                                }
                            }
    
                            $(document.body).append(data.popupContainer.hide());
    
                            // If the toggle element is a hyperlink, add "href" attribute to the link
                            // to enable TAB navigation.
                            if (data.attachElement[0] && data.attachElement[0].tagName === "A") {
                                data.attachElement.attr({ "href": "javascript:void(0)" })
                            }
    
                            data.backgroundFilter = $("<div></div>");
    
                            data.initialized = true;
                        }
                    };
    
                    data.helper.resetOptions = function () {
                        /// <summary>
                        /// Resets the options.
                        /// </summary>
    
                        // Initialize options.
                        switch (data.options.mode) {
                            case "dialog":
                                data.options.showCommandButtons = true;
                                if (data.options.commandButtons.length !== 0) {
                                    data.options.useDefaultCommandButtons = false;
                                } else {
                                    data.options.useDefaultCommandButtons = true;
                                }
                                break;
                            case "modal":
                                data.options.showCommandButtons = true;
                                break;
                            case "popup":
                            default:
                                data.options.showCommandButtons = false;
                                break;
                        }
    
                        if (!data.options.title) {
                            data.options.showTitle = false;
                        } else {
                            data.options.showTitle = true;
                        }
                    };
    
                    data.helper.initializeContainer = function () {
                        /// <summary>
                        /// Initializes the popup container.
                        /// </summary>
    
                        // Create popup layout.
                        if (data.popupContainer) {
                            data.popupContainer.empty();
                        } else {
                            data.popupContainer = $("<div></div>").css({ "width": data.options.width, "height": data.options.height });
                        }
    
                        if (data.options.showTitle) {
                            data.titleContainer = $("<div></div>").appendTo(data.popupContainer);
                        } else {
                            data.titleContainer = $(null);
                        }
    
                        data.popupContainer.append(data.contentContainer);
    
                        if (data.options.showCommandButtons) {
                            data.buttonContainer = $("<div></div>").appendTo(data.popupContainer);
                        } else {
                            data.buttonContainer = $(null);
                        }
    
                        // Initialize title.
                        data.titleContainer.html(!data.options.title ? "" : data.options.title);
    
                        // Initialize buttons.
                        var buttons = null;
    
                        if (data.options.useDefaultCommandButtons) {
                            buttons = data.defaultCommandButtons;
                        } else {
                            buttons = data.options.commandButtons;
                        }
    
                        // Create command buttons.
                        $.each(buttons, function () {
                            $('<button type="button"></button>').attr({
                                "value": !this.value ? "" : this.value
                            }).click(!this.onclick ? null : this.onclick).text(!this.text ? "" : this.text).appendTo(data.buttonContainer);
                        });
    
                        // Adjust popup styles.
                        data.helper.adjustStyle();
    
                        try { delete buttons; } catch (e) { buttons = null; }
                    };
    
                    data.helper.adjustStyle = function () {
                        /// <summary>
                        /// Adjusts CSS style according to the options.
                        /// </summary>
    
                        data.attachElement.addClass(data.css.popupButton);
                        data.popupContainer.addClass(data.css.popupContainer);
                        data.titleContainer.addClass(data.css.title);
                        data.buttonContainer.addClass(data.css.button);
                        data.contentContainer.addClass(data.css.content);
                    };
    
                    data.helper.adjustPosition = function () {
                        if (data.options.mode === "modal") {
                            data.popupContainer.css({
                                "position": "fixed",
                                "left": ($(window).width() - data.popupContainer.width()) / 2,
                                "top": ($(window).height() - data.popupContainer.height()) / 2,
                                "right": "auto",
                                "bottom": "auto",
                                "z-index": "999"
                            });
                        } else {
                            switch (data.options.position.toLowerCase()) {
                                case "topleft":
                                    data.popupContainer.css({ "top": "0px", "left": "0px", "right": "auto", "bottom": "auto" });
                                    break;
                                case "topcenter":
                                    data.popupContainer.css({ "top": "0px", "left": ($(window).width() - data.popupContainer.width()) / 2, "right": "auto", "bottom": "auto" });
                                    break;
                                case "topright":
                                    data.popupContainer.css({ "top": "0px", "left": "auto", "right": "0px", "bottom": "auto" });
                                    break;
                                case "middleleft":
                                    data.popupContainer.css({ "top": ($(window).height() - data.popupContainer.height()) / 2, "left": "0px", "right": "auto", "bottom": "auto" });
                                    break;
                                case "middlecenter":
                                    data.popupContainer.css({ "top": ($(window).height() - data.popupContainer.height()) / 2, "left": ($(window).width() - data.popupContainer.width()) / 2, "right": "auto", "bottom": "auto" });
                                    break;
                                case "middleright":
                                    data.popupContainer.css({ "top": ($(window).height() - data.popupContainer.height()) / 2, "left": "auto", "right": "0px", "bottom": "auto" });
                                    break;
                                case "bottomleft":
                                    data.popupContainer.css({ "top": "auto", "left": "0px", "right": "auto", "bottom": "0px" });
                                    break;
                                case "bottomcenter":
                                    data.popupContainer.css({ "top": "auto", "left": ($(window).width() - data.popupContainer.width()) / 2, "right": "auto", "bottom": "0px" });
                                    break;
                                case "bottomright":
                                    data.popupContainer.css({ "top": "auto", "left": "auto", "right": "0px", "bottom": "0px" });
                                    break;
                                case "default":
                                default:
                                    if (!data.attachElement[0] || data.attachElement[0] === document) {
                                        throw new Error('In default popup display mode, the "attathElement" must set to a valid DOM element.');
                                    }
    
                                    // Adjust popup location.
                                    var elementPosition = data.attachElement.position();
                                    var popupWidth = data.popupContainer.width();
                                    var popupHeight = data.popupContainer.height();
    
                                    var rightOffset = elementPosition.left + popupWidth;
                                    var bottomOffset = elementPosition.top + popupHeight;
    
                                    // Determine whether if the toggle element is close to the right of the window.
                                    // if so, adjust the left offset of the popup container.
                                    if (rightOffset + 50 >= $(window).width()) {
                                        data.popupContainer.css({ "right": $(window).width() - (elementPosition.left + data.attachElement.width() + data.options.offsetX), "left": "auto" });
                                    } else {
                                        data.popupContainer.css({ "left": elementPosition.left + data.options.offsetX });
                                    }
    
                                    // Determine whether if the toggle element is close to the bottom of the window.
                                    // if so, adjust the top offset of the popup container.
                                    if (bottomOffset + 8 >= $(window).height()) {
                                        data.popupContainer.css({ "top": elementPosition.top - (8 + popupHeight - data.options.offsetY) });
                                    } else {
                                        data.popupContainer.css({ "top": elementPosition.top + data.attachElement.height() + 8 + data.options.offsetY });
                                    }
    
                                    try {
                                        delete rightOffset, bottomOffset, elementPosition, popupHeight, popupWidth;
                                    } catch (e) {
                                        rightOffset = bottomOffset = elementPosition = popupHeight = popupWidth = null;
                                    }
                                    break;
                            }
    
                            data.popupContainer.css({ "position": data.options.alwaysVisible ? "fixed" : "absolute", "z-index": "999" });
                        }
                    };
    
                    data.helper.processInit = function () {
                        /// <summary>
                        /// Handles the initialization.
                        /// </summary>
    
                        if (!data.reload) {
                            data.helper.initialize();
                        } else {
                            data.helper.resetOptions();
                            data.helper.initializeContainer();
                        }
                    };
    
                    data.helper.showBackgroundFilter = function () {
                        /// <summary>
                        /// Shows the background filter div element while the popup appears.
                        /// </summary>
    
                        if (data.options.mode !== "modal") {
                            return;
                        }
    
                        data.backgroundFilter.css({
                            "position": "fixed",
                            "left": "0px", "top": "0px", "right": "0px", "bottom": "0px",
                            "z-index": "998"
                        }).addClass(data.options.mode === "modal" ? data.css.modal : data.css.backgroundFilter).click(function () {
                            // In Modal Dialog mode, "click to close" is disabled.
                            if (data.options.mode === "modal") { return; }
    
                            data.helper.processCommand("close");
                            if (!data.isShowing) {
                                $(this).remove();
                            }
                        }).appendTo(document.body).show();
    
                        // Fix for IE 7.
                        // Now this fix applies to any version of IE due to the single-instance issue.
                        // if ($.browser.msie && parseFloat($.browser.version) < 8.0 && data.options.mode !== "modal") {
                        if ($.browser.msie && data.options.mode !== "modal") {
                            data.backgroundFilter.css({ "background-color": "#fff", "filter": "alpha(opacity=0)" });
                        }
    
                        // Register for the global ESC and ENTER keyboard events.
                        $(document).keypress(function (key) {
                            if (data.options.mode === "modal" && data.options.useKeyboardShortcuts && data.options.useDefaultCommandButtons) {
                                switch (key.which) {
                                    case 13:
                                        if ($.isFunction(data.options.onok)) {
                                            data.options.onok.apply(data.contentContainer, [data]);
                                        } else {
                                            data.helper.processCommand("close");
                                        }
                                        break;
                                    case 27:
                                        if ($.isFunction(data.options.oncancel)) {
                                            data.options.oncancel.apply(data.contentContainer, [data]);
                                        } else {
                                            data.helper.processCommand("close");
                                        }
                                        break;
                                    default:
                                        break;
                                }
                            }
                        });
                    };
    
    
                    data.helper.hideBackgroundFilter = function () {
                        /// <summary>
                        /// Hides the background filter div element while closing the popup.
                        /// </summary>
    
                        if (!data.isShowing) {
                            $(document).unbind("keypress");
                            data.backgroundFilter.remove();
                        }
                    };
    
                    data.helper.processShowPopup = function () {
                        /// <summary>
                        /// Handles the "show" command.
                        /// </summary>
    
                        data.helper.processInit();
    
                        if (data.isShowing) {
                            return;
                        }
    
                        data.helper.adjustPosition();
    
                        if ($.isFunction(data.options.onshowing)) {
                            if (data.options.onshowing.apply(data.contentContainer, [data]) === false) {
                                return;
                            }
                        }
    
                        data.helper.showBackgroundFilter();
                        data.popupContainer.show().focus();
                        data.isShowing = true;
    
                        if (data.options.mode !== "modal") {
                            $(document.body).click(function (event) {
                                if ($.contains(data.popupContainer[0], event.target) || (data.options.registerClickEvent && event.target === data.attachElement[0])) {
                                    return;
                                } else {
                                    data.helper.processCommand("close");
                                }
                            }).focus();
    
                            $(window).resize(function () {
                                data.helper.processCommand("close")
                                $(window).unbind("resize");
                            });
    
                            if (data.options.escapeToClose) {
                                $(document).keypress(function (key) {
                                    switch (key.which) {
                                        case 27:
                                            if ($.isFunction(data.options.oncancel)) {
                                                data.options.oncancel.apply(data.contentContainer, [data]);
                                            } else {
                                                data.helper.processCommand("close");
                                            }
                                            break;
                                        default:
                                            break;
                                    }
                                });
                            }
                        }
    
                        if ($.isFunction(data.options.onshown)) {
                            // Required call to storeData().
                            data.helper.storeData();
                            data.options.onshown.apply(data.contentContainer, [data]);
                        }
                    };
    
                    data.helper.processShow = function () {
                        /// <summary>
                        /// Handles the "show" command.
                        /// </summary>
    
                        data.helper.processInit();
                        data.helper.processShowPopup();
                    };
    
                    data.helper.processClose = function () {
                        /// <summary>
                        /// Handles the "close" command.
                        /// </summary>
    
                        if (!data.isShowing) {
                            return;
                        }
    
                        if ($.isFunction(data.options.onclosing)) {
                            if (data.options.onclosing.apply(data.contentContainer, [data]) === false) {
                                return;
                            }
                        }
    
                        data.popupContainer.hide();
                        data.isShowing = false;
                        data.helper.hideBackgroundFilter();
    
                        if ($.isFunction(data.options.onclosed)) {
                            // Required call to storeData().
                            data.helper.storeData();
                            data.options.onclosed.apply(data.contentContainer, [data]);
                        }
                    };
    
                    data.helper.processQuery = function () {
                        /// <summary>
                        /// Handles the "query" command.
                        /// </summary>
                        switch (data.query) {
                            case "isshowing":
                                $(element).data("queryresult", data.isShowing);
                                break;
                            default:
                                break;
                        }
                    };
    
                    data.helper.processDispose = function () {
                        /// <summary>
                        /// Cleans up all the resources used by popup.
                        /// <summary>
                        data.popupContainer.remove();
                        $(element).removeData("xpopup");
                        data.attachElement.removeClass(data.css.popupButton);
                        try { delete data; } catch (e) { data = null; }
                    };
    
                    data.helper.processCommand = function (command) {
                        /// <summary>
                        /// Handles different commands that passed from function.
                        /// </summary>
                        switch (command) {
                            case "init": data.helper.processInit(); break;
                            case "show": data.helper.processShow(); break;
                            case "close": data.helper.processClose(); break;
                            case "query": data.helper.processQuery(); break;
                            case "dispose": data.helper.processDispose(); break;
                            default: data.helper.processShow(); break;
                        }
    
                        data.helper.storeData();
                    };
    
                    data.helper.storeData = function () {
                        /// <summary>
                        /// Stores the entire data to memory to reduce memory usage.
                        /// </summary>
                        $(element).data("xpopup", data);
                    };
                }
    
                data.helper.processCommand(data.command);
            };
        }
    
        var documentLoaded = false;
        $(document).ready(function () { documentLoaded = true; });
    
        $.fn.xpopup = function (command, options) {
            /// <summary>
            /// Extendes the element with popup behavior, modal dialog or popup dialog.
            /// </summary>
            /// <param name="command" type="String">
            /// The specified command to be invoked. Value can be one of the following strings: "init", "show", "close", "query".
            /// </param>
            /// <param name="options" type="Object">Object that contains the options.</param>
            /// <returns type="jQuery"></returns>
    
            return this.each(function () {
                if (documentLoaded) {
                    return window.xpopup(this, command, options);
                } else {
                    var temp = this;
                    $(document).ready(function () { return window.xpopup(temp, command, options); });
                    try { delete temp; } catch (e) { temp = null; }
                }
            });
        };
    
    })();
    
    核心代码参考 processCommand 函数。
    Mark Zhou
    2010年3月11日 9:15
  • 需要那么麻烦么 = = 不就一个弹窗嘛,类似panel.Visible = true 或者 false 罢了,控件都可以直接访问的,callback也可以用。

    刚想用ajax,看来打击比较大 = =

    霸王
    2010年3月11日 14:13
  • 呵呵,我也是用了一个pannel,然后visible=true,false就可以了,mazhou 的代码好长啊,目前估计还是用不上了

    2010年3月12日 5:39