开发者

Opening Spring jsp in a popup window

开发者 https://www.devze.com 2023-04-11 16:36 出处:网络
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 applicat

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 browser开发者_JS百科s?

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号