简体   繁体   English

使用JQuery模态(可选的SimpleModal)仅覆盖窗口的一部分

[英]Covering only part of the window with a JQuery modal (optionally SimpleModal)

I have a button click on an ASP.NET page that I expect to take a while. 我在ASP.NET页上单击了一个按钮,我希望花点时间。 I want to show a small loading gif over the frame that the user has been inputting data to signal the user that things hare happening, but so far I have completely failed to restrict the overlaying modal to the active frame. 我想在框架上显示一个小的加载gif,表明用户一直在输入数据,以向用户发出信号,告知发生了事情,但是到目前为止,我完全无法将叠加模式限制为活动框架。 It instead covers the whole screen, which I do not want; 相反,它覆盖了整个屏幕,这是我不想要的。 there is other navigation on the page that the user should still have access to so they may navigate away if it takes too long and they get bored. 页面上还有其他导航,用户仍然应该可以访问,因此如果花费的时间太长并且感到无聊,他们可能会离开。

How may I modify the modal's invocation so it only blocks off the part of the page that the user has modified (eg, one specific div)? 我如何修改模式的调用,使其仅阻止用户已修改的页面部分(例如,一个特定的div)?

Due to the proprietary 'workflow' system being used on this project, I am unable to use simple AJAX techniques to do what I need; 由于该项目使用了专有的“工作流”系统,因此我无法使用简单的AJAX技术来完成所需的工作; frustratingly, even though the logical page doesn't change (it is still Webpage1.aspx), the fields and such change quite a bit, so AJAX invocations will not work across workflow steps. 令人沮丧的是,即使逻辑页面没有更改(它仍然是Webpage1.aspx),字段和此类字段也发生了很大变化,因此AJAX调用将无法跨工作流步骤进行。 That is my large problem here; 这是我的大问题; the button click I am using changes workflow steps. 该按钮单击我正在使用更改工作流步骤。

EDIT: I have mostly been doing my experimentation so far with SimpleModal, so I'm reasonably comfortable with that, but I am not bound to it by any means if there's a standard JQuery way of doing this. 编辑:到目前为止,我大部分时间都在使用SimpleModal进行实验,因此我对此感到很满意,但是如果有标准的JQuery方式,我就不会受到任何限制。

For what it's worth (nobody seems to be looking at this topic but I hate to leave something undone), I figured this out and this is what you're looking for in SimpleModal: 对于它的价值(似乎没人在看这个话题,但是我讨厌遗漏一些东西),我弄清楚了,这就是您在SimpleModal中寻找的东西:

            $('#TheModal').modal({
                opacity: 0,
                modal: false         
            });

That makes a basic modal box that can pop up, doesn't output any backdrops, and doesn't block off the whole page. 这使得一个基本的模式框可以弹出,不输出任何背景,并且不会阻塞整个页面。 You can then use the other styling options to put it wherever you want. 然后,您可以使用其他样式选项将其放置在所需的任何位置。

This is pretty dirty since you're effectively taking a modal plug-in and telling it not to behave as a modal, but for the ridiculous situation I'm in it seems to work pretty well! 这很脏,因为您实际上是在使用模态插件并告诉它不要充当模态插件,但是对于可笑的情况,我看来它工作得很好!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 jquery-ui模态窗口,仅使其一部分像新的Facebook照片标记窗口一样滚动 - jquery-ui modal window, make only one part of it scroll like new Facebook photo tagging window 如何打开新的模态窗口以关闭当前使用的simplemodal - How to open a new modal window to close the current use of simplemodal 无法使Simplemodal在模式窗口中显示链接内容 - Can't get Simplemodal to display link content in modal window SimpleModal:调整窗口大小会导致滚动条和模式内容的重绘 - SimpleModal: window resize causes scrollbar and redraw of modal content SimpleModal基本模态窗口在选择时显示无效页面 - SimpleModal basic modal window displays invalid page on select SimpleModal:在模式窗口中提交后如何传递mailtolink - SimpleModal: how to pass mailtolink after Submit in the modal window 使用SimpleModal JS创建一个模态来填充浏览器窗口。 - Using SimpleModal JS to create a modal to fill the browser window. 调整模态div时,自动将Jquery SimpleModal重新定位到页面中心 - Automatically reposition Jquery SimpleModal to center of page when modal div is resized jQuery模式窗口仅在输入值长度大于2时显示 - Jquery modal window show only if input value lenght is more than 2 jQuery Modal窗口仅适用于Chrome,不适用于FF和IE9 - jQuery Modal window only working on Chrome but not FF & IE9
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM