问题标签 [modalpopups]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
1325 浏览

jquery - 单击 ModalPopup IFrame 更改父窗口中的 URL

我正在使用 Visual Studio 2008 和 ASP.NET MVC 1。

我有一个视图,我在其中使用 fancybox 在模式弹出窗口中打开另一个视图。在此弹出窗口中,用户可以编辑一些数据。它工作得很好,数据由模态弹出窗口呈现,但是当我单击保存按钮时,父窗口更改为模态弹出内容。

链接看起来像这样

我该怎么办,单击保存按钮后的响应仍保留在模式弹出窗口中。

提前致谢

0 投票
2 回答
1449 浏览

jquery - 父页面生成模态窗口,模态windw上的按钮导致父级触发回发?

我有一个 asp.net 网络表单。用户将填写表单上的一些字段。有一个打开模态窗口的超链接(我正在使用 jquery 和 prettyphoto,但可能会切换到http://www.ericmmartin.com/projects/simplemodal/因为他的文档更好)

模态窗口包含一个 iFrame,用户在其中进行选择并保存记录。

此时我需要关闭该窗口并在父页面上触发回发。

目前我在最后一页有一个超链接,其中 target = parent 和 href = parent page url。然后我有一个自动点击它的javascript。我知道这是一个廉价的黑客。然后它将用户发送回父页面,但是页面被重新加载并且所有原始数据都丢失了。这就是问题。

最好的方法是什么?

谢谢!

0 投票
2 回答
471 浏览

asp.net - modalpopup 与 url 重写

为什么当我使用 url 重写然后 modalpopup(asp.net ajax controltoolkit 不起作用?为什么?

我的代码

0 投票
1 回答
2005 浏览

asp.net - 使用下拉列表编辑 Gridview 行变得太宽 - 我该如何使用弹出面板?

我在选项卡面板中有一系列 GridView - 数据绑定到通用业务对象列表。

Gridview 中的列都类似如下:

GridView 在行的开头生成“编辑”链接,所有事件都可以触发。问题是数据越来越长。当处于“显示模式”时,这很好,因为 GridView 控件足够智能,可以将一些文本分成多行(特别是 Project、Title 和 Worker 名称可能会变得很长)。

问题出现在编辑模式中。下拉列表不要将条目分成多行(出于显而易见的原因)。在 Gridview 的一行中进入 Edit ode 可以使 Griview 水平扩展为屏幕大小的两倍(突破母版页和 CSS 中的宽度限制,但这只是一个相关问题)。

我需要的是类似于 ModalPopup 的东西——但是试图将它与 EditItemTemplate 中的 ID 联系起来会在页面呈现时给我错误(因为当时不存在“ddlXXXX”)。此外,我不知道如何动态填充面板以便我可以从中获得响应(例如他们选择的公司的 ID)。

我也试图避免使用 javascript,并希望这是一个“纯”的 aspx/代码隐藏解决方案(为了简单起见)。

我找到的所有示例都是带有预定义面板的模态弹出窗口。即使它(弹出面板)类似于复选框列表,它也可以数据绑定到我已经准备好使用的 SortedList 和一个确定/取消按钮组合来接受或忽略事物。我只是不确定去哪里。

我愿意接受建议。提前致谢。

编辑:最终解决方案如下所示:

在代码隐藏中,lstIDLabor 是绑定到 GridView 的通用数据行列表(其中 Company 是属性之一,也是业务对象):

0 投票
1 回答
882 浏览

javascript - iframe 中的 Google Docs 和保存并关闭按钮

我在我的项目中使用 Google Docs 使用它的 API。

我正在使用http://fancybox.net/一个 jquery 插件在模态窗口 iframe 中加载文档

它工作正常,但是当在 Google Docs中按下Save and Close按钮​​时,它会关闭 iframe 并将当前页面重定向到 Google Docs,那么有什么方法可以阻止重定向到 Google Docs 并关闭模式窗口?

谢谢你。

0 投票
1 回答
1080 浏览

perl - 如何在 Perl/Tk 中创建非模式对话框?

我正在学习 Perl/Tk。我想在用户收到邮件时提醒他/她。

我计划在 Tk 中使用消息框,但希望用户单击确定或取消按钮。

在用户单击任何一个按钮之前,它不会进行任何进一步的操作。

但我想要,它只需要向用户发出警报,用户就可以继续进一步的过程。

0 投票
5 回答
2465 浏览

ipad - Problem after dismissing a modal view used in conjunction with a uisplitviewcontroller

I'm having a hard time understanding why the following is happening (and how to fix it).

I've created an application using the split-view based application.

I've added a UiBarButtonItem called showTheModal which calls this method found in RootViewController.m:

The BarButtonItem of course, is shown at the bottom of the Default Root Controller (left side of the of the split view in landscape) or at the bottom of the popup (if in landscape).

The modal view is dismissed by a button placed in a toolbar. It calls the following:

The problem I'm having is if rotate the screen, while the modal is up. Here is what happens in different scenarios (start refers to the orientation when the showTheModal button is hit, end refers to the orientation when I hit the dismissModal button).

1)Start landscape, end landscape: Everything appears fine. willHideViewController and willShowViewController methods are not called in the RootViewController (as expected)

2) Start landscape, end portrait: UI appears fine. willHideViewController is run TWICE (WHY?)

3) Start portrait, end portrait: UI appears fine. willHideViewController is run once (as expected)

4) Start portrait, end landscape: The 'Root List' button remains in the detail view (right side of the split view. Neither willHideViewController and willShowViewController are invoked (WHY??)

Any thoughts as to why #2 and #4 don't behave quite the expected way?

0 投票
1 回答
1073 浏览

icefaces - icefaces 模态弹出超时问题

有一个问题一直困扰着我一段时间。我正在使用 icefaces 生成带有搜索字段的模式弹出窗口。单击搜索会启动特定网站的屏幕抓取工具。

我的问题是这个。如果你输入一些非常通用的术语,显然刮板需要更长的时间才能完成,这会导致超时。超时会导致模式弹出窗口冻结并且无法关闭。

如果发生超时,如何优雅地关闭弹出窗口并导航到另一个页面?

0 投票
3 回答
5643 浏览

asp.net-mvc - ASP MVC 2:Jquery modal popup,如何返回数据

我正在考虑向我的 mvc 项目添加一个 jquery 模态弹出窗口。我一直在看http://www.weirdlover.com/2010/05/20/mvc-render-partial-modal-pop-up-via-jquery-and-colorbox-demo/发帖。

我的场景:我有一个包含几个输入字段(文本框、复选框)的页面。我想要一个链接来打开一个模式弹出窗口来选择一个图像。我有一个控件,它将显示所有图像并允许用户选择图像。我了解如何在上面列出的站点之后打开模式弹出窗口。

我现在不明白的是如何将所选图像名称(myimage.jpg)返回到我的原始页面视图并将其设置为模型上的一个属性,而所有其他模型更改保持不变。

我目前拥有的:MyFormController > ActionMethod:ImageSelected(ImageSelectorModel model)

如果它有效,我如何获取我的“MyFormModel”(以及所有其他更改),设置 MyFormModel.ImageName = model.ImageName 并调用 View(myFormModel)。

谢谢你的帮助

凯文

0 投票
1 回答
1270 浏览

iphone - iPhone UI 设计问题 - 设计表单的最佳方式?

我想设计一个需要用户输入一些东西的应用程序,比如开始日期、结束日期、一堆其他选项和一些文本评论,我打算使用选择器来选择将模态向上滑动的数据。我需要向上和向下移动视图,以确保当拾取器和键盘上下滑动时填写的元素保持焦点。

我的问题是实施这种“形式”的最佳观点是什么?我在考虑分组表视图,我可以在其中明智地分隔字段。

有没有其他方法可以实现这些东西?根据经验或最佳实践,是否有更好的替代方案或示例代码或应用程序可供我探索?

开发。