如何“链接” YUI 2 中的模式对话框?

发布于 2024-08-27 00:28:13 字数 258 浏览 3 评论 0原文

我在 Yahoo UI 中显示了一个模式对话框。用户从对话框“A”中选择一个值,然后我想呈现另一个模式对话框以在对话框“B”中收集更多数据。

我已经成功使用YAHOO.widget.Dialog。问题似乎是您无法从对话框“A”的处理函数启动对话框窗口“B”。那么,在用户点击第一个对话框窗口的“确定”按钮后,如何以编程方式启动第二个对话框窗口呢?

(我曾尝试为对话框“A”中更新的字段创建一个额外的侦听器以触发对话框“B”,但这也不起作用。)

谢谢..

I have a modal dialog box presented in Yahoo UI. The user selects a value from dialog "A", and then I want to present another modal dialog box to collect some more data in dialog "B".

I have been using the YAHOO.widget.Dialog successfully. The problem seems to be that you can't initiate dialog window "B" from the handler function of dialog "A". So, how can you programmatically launch a second dialog window after the user hits the "OK" button on the first ?

(I had tried to create an additional Listener for a field that is updated in dialog "A" to trigger dialog "B" but this doesn't work either.)

Thanks..

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦旅人picnic 2024-09-03 00:28:13

查看文档: http://developer.yahoo.com/yui/container/对话框/#events。下面的代码应该可以解决这个问题:

var firstDialog = new YAHOO.widget.Dialog('firstDialog', { postmethod: "manual" });

firstDialog.manualSubmitEvent.subscribe(function (type, args) {

    var nextDialog = new YAHOO.widget.Dialog('nextDialog', {  });

    /* more configuration stuff... */

    nextDialog.render();
    nextDialog.show();

});

firstDialog.render();
firstDialog.show();

这处理提交表单的时间,我认为您的意思是选择一个值,但如果没有让我知道,我可以就这种情况提供一些帮助。

Check out the documentation: http://developer.yahoo.com/yui/container/dialog/#events. The following code should do the trick:

var firstDialog = new YAHOO.widget.Dialog('firstDialog', { postmethod: "manual" });

firstDialog.manualSubmitEvent.subscribe(function (type, args) {

    var nextDialog = new YAHOO.widget.Dialog('nextDialog', {  });

    /* more configuration stuff... */

    nextDialog.render();
    nextDialog.show();

});

firstDialog.render();
firstDialog.show();

This handles when the form is to be submitted, which I think what you mean by selects a value, but if not let me know and I can give some help on that situation.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文