在弹出窗口中打开 Spring jsp

发布于 2024-12-08 08:12:47 字数 176 浏览 0 评论 0原文

我的应用程序需要像 Outlook 邮件这样的解决方案:在父窗口上打开另一个页面作为弹出窗口。该应用程序基于 Spring 3 并使用 jsp。如何在我的应用程序页面中制作弹出窗口,以使其至少在大多数常见浏览器中按预期工作?

我尝试过 target 和 window.open,但没有让它们在 Firefox 中正常工作。

My application needs a solution like Outlook mail: opening an other page as popup window on the parent window. The application is Spring 3 based and uses jsps. How do I make a popup out of my application page in order to make it work as intended at least in most common browsers?

I've tried target and window.open, without getting them work properly in Firefox.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

乙白 2024-12-15 08:12:47

举个例子,Spring 旅行示例应用程序包含一个通过弹出窗口启动的 jsp。

<a id="changeSearchLink" href="hotels/search?searchString=${searchCriteria.searchString}&pageSize=${searchCriteria.pageSize}">Change Search</a>
<script type="text/javascript">
    Spring.addDecoration(new Spring.AjaxEventDecoration({
        elementId: "changeSearchLink",
        event: "onclick",
        popup: true,
        params: {fragments: "searchForm"}       
    }));
</script>

这显示了如何使用 Ajax 事件修饰链接,以便在单击链接时启动 searchForm.jsp。

Just as an example, the Spring travel sample app contains a jsp which is launched via a pop-up.

<a id="changeSearchLink" href="hotels/search?searchString=${searchCriteria.searchString}&pageSize=${searchCriteria.pageSize}">Change Search</a>
<script type="text/javascript">
    Spring.addDecoration(new Spring.AjaxEventDecoration({
        elementId: "changeSearchLink",
        event: "onclick",
        popup: true,
        params: {fragments: "searchForm"}       
    }));
</script>

This shows how a link is decorated with an Ajax Event to launch searchForm.jsp when the link is clicked.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文