ShowModalDialogue的良好替代品 [英] Good replacement for ShowModalDialogue

查看:166
本文介绍了ShowModalDialogue的良好替代品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



目前在我的网站上,我正在显示ShowModalDialogue以显示警告。最近我被要求修改下面的行为:



早期行为:



我过去只是显示一条警告信息。用户可以单击对话框的确定或关闭按钮继续。



新行为:



我被要求在同一个ShowModalDialogue中插入一个文本框。现在,用户必须在单击确定按钮之前插入其首字母。此外,他现在也无法通过单击关闭按钮关闭对话框。如果他在文本框为空时单击关闭按钮或确定按钮尝试关闭对话框,则必须打开相同的弹出窗口并显示警告。但问题是在关闭警告信息后,对话框在屏幕上随机移动,即使其属性已被修改,使其不会移动。



现在我被问到用更好的东西取代这个ShowModalDialogue。

我有两个建议:1。CSS div Popup 2. Ajax-control ModalPopup。

哪一个更好?

还有什么可以用来替代我可以使用吗?



我主要担心的是外观好看且容易处理。



提前谢谢。

解决方案

您可以使用 jQuery UI对话框。它非常易于使用和修改,并且兼容跨浏览器。



以下是您可以查看的演示:DEMOS


如果你问我,我会选择 ModalPopupExtender [ ^ ],因为我们可以根据需要轻松自定义。





- 阿米特

Hi all,

Currently in my website, I am displaying a ShowModalDialogue to display a warning. Recently I have been asked to modify the behavior of this as belows :

Earlier behavior :

I used to just show a warning message. The user can click OK or Close button of the dialogue box to proceed.

New behavior :

I have been asked to insert a text box in the same ShowModalDialogue. Now the user has to insert his initials before clicking OK button. Also now he can not close the dialogue by clicking Close button also. If he tries to close the dialogue by clicking either on Close button or OK button while text box is empty, same pop up has to open with warning. But the trouble is after closing the warning message dialogue is shifted randomly on screen even though its properties have been modified such that it will not move.

Now I have been asked to replace this ShowModalDialogue by something better.
I have two suggestions : 1. CSS div Popup 2. Ajax-control ModalPopup.
Which one of them is better?
Is there anything else which can be used instead that I can use?

My major concerns are good look and easy to handle.

Thanks in advance.

解决方案

You can use the jQuery UI Dialog. Its very simple to use and modify and also is cross-browser compatible.

Here are the demos you can have a look: DEMOS


If you ask me, I'll choose ModalPopupExtender[^], because we can easily customize it according to the need.


--Amit


这篇关于ShowModalDialogue的良好替代品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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