开发者

JSP and HTML frameset

开发者 https://www.devze.com 2023-03-20 15:20 出处:网络
I am using frameset in my html (GUI). My GUI consists of four parts header, footer, side navigation and content page.

I am using frameset in my html (GUI). My GUI consists of four parts header, footer, side navigation and content page.

Now I have provide a functionality for log out button in the header frameset. After redirecting the new JSP page is displayed only in the header not in the window (window still contains all the above framesets)

I want to display this new redirected page on the whole开发者_C百科 window.


You should do this at the client side.

<form action="/logout" method="post" target="_top">
<input type="submit" name="logout" value="Logout">
</form>


If one of the pages you redirect to shouldn't have the outer frames you can use javascript to break out

// run this javascript on the logout landing page and it will remove the frames
if (parent.frames.length>0){
   parent.location.href=self.document.location;
}
0

精彩评论

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

关注公众号