I have a customer visits list page, in which add visit invokes a bootstrap popup ("#Pop1") to record visit details. In the modal, I have provision to add new customer (on the fly), which in turn opens another popup ("#Pop2") to capture new customer details.
我有一个客户访问列表页面,其中添加访问调用引导弹出窗口(“#Pop1”)来记录访问详细信息。在模式中,我有提供添加新客户(即时),然后打开另一个弹出窗口(“#Pop2”)来捕获新的客户详细信息。
On successful save of the new customer (via AJAX) I show an alert (browser alert) and close new customer popup using $("#Pop2").hide();.
On successful save of visit, I show an alert and close the add visit popup using $("#Pop1").hide();.
在成功保存新客户(通过AJAX)后,我显示警报(浏览器警报)并使用$(“#Pop2”)关闭新客户弹出窗口.hide();.成功保存访问后,我会显示警报并使用$(“#Pop1”)关闭添加访问弹出窗口.hide();.
I have a couple of issues in this context.
在这方面我有几个问题。
-
(critical) Pop1 -> Pop2 -> Save -> Save. In this scenario, it returns to the listing page, but the page is not accessible. a transparent layer (that came with Pop1) was still overlay on the page. I need to refresh entire page to add another visit.
(关键)Pop1 - > Pop2 - >保存 - >保存。在这种情况下,它返回到列表页面,但页面不可访问。一个透明的图层(Pop1附带)仍然覆盖在页面上。我需要刷新整个页面以添加另一个访问。
-
When I close the Pop2 using close button, it closes both the popups.
当我使用关闭按钮关闭Pop2时,它会关闭两个弹出窗口。
Is there a piece of JS or CSS I need to apply to get this work properly?
是否需要应用一段JS或CSS才能正常工作?
1 个解决方案
#1
2
instead of $("#Pop2").hide();
use $("#Pop2").modal('hide');
而不是$(“#Pop2”)。hide();使用$(“#Pop2”)。modal('hide');
same goes for Pop1
also
同样适用于Pop1
#1
2
instead of $("#Pop2").hide();
use $("#Pop2").modal('hide');
而不是$(“#Pop2”)。hide();使用$(“#Pop2”)。modal('hide');
same goes for Pop1
also
同样适用于Pop1