简体   繁体   中英

JSP and HTML frameset

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 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;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM