X上的Dojo对话框关闭事件

X上的Dojo对话框关闭事件

本文介绍了X上的Dojo对话框关闭事件(右上)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即时通讯使用道场创建一个简单的对话框创建在系统中的用户。问题是我得到的错误:

Im using dojo to create a simple dialog to create a user in a system. The problem is i get the error:

试过用身份证登记部件== user_submit,但该ID已被注册

user_submit,是一个道场按钮,我必须完成的对话框里面的形式。当我点击它,并提交表单关闭对话框有再次打开对话框(在按钮我有这行code的单击事件没有问题: dijit.byId(user_submit) .destroy(); ),但如果我在[X] -link /按钮关闭对话框的右上角,我不破坏按钮,然后离不开重装再次打开对话框这一页。我如何获得道场摧毁按钮或如何在超载上的click事件[X] -link /按钮,这样我就可以写CMD破坏该按钮??

user_submit, is a dojo button i have to finish the form inside the dialog. When i close the dialog by clicking it and submitting the form there is no problem in opening the dialog again (in the click event on the button i have this line of code: dijit.byId("user_submit").destroy();), but if I close the dialog through the [x]-link/button in the top-right corner i don't destroy the button and then can't open the dialog again without reloading the page. How do i get dojo to destroy the button or how to a overload the click-event on [X]-link/button so i can write the destroy cmd for the button??

推荐答案

找到了解决办法。通过使用dojo.connect()。

Found a solution. by using dojo.connect().

myDialog.connect(myDialog, "hide", function(e){
    dijit.byId("user_submit").destroy();
});

本来postet在这之后不久,在i贴quistion,但我没有足够的积分,所以这里的答案还是一样,只晚了一点: - )

Would have postet this shortly after i posted the quistion, but I didn't have enough points, so here is the answer again, just a little late :-)

这篇关于X上的Dojo对话框关闭事件(右上)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 22:41