Frameset How to do to quit landing and then jump to another page

Source: Internet
Author: User

Problem: Frameset frame, in the frame of the previous page has to exit the link, now click this link can be empty session, but the jump is not the whole frameset jump to the new page, just have to exit the landing link that page jump to the new page.
Using JavaScript to pull out of the log to close the window of the link is not good, in the frameset does not seem to work.
What can I do to make the entire frameset page jump to the new page? Or do you have to quit the landing in another way?

Reply:

Reference:
mainframe.jsp
<%@ page contenttype= "text/html; charset=gb2312 "language=" java "import=" java.sql.* "errorpage=" "%>"
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/>
<title&gt:::::::::, Xiamen Press and Publication Bureau---function page::::::::::::::::::::</title>
<frameset cols=15%,86% id= "Parentframe" >
<frame src= "leftmenu.jsp" name= "left" >
<frameset rows=4%,* cols= "*" framespacing= "0" frameborder= "0" >
<frame src= "top.jsp" name= "top" frameborder= "0" marginheight= "0" marginwidth= "0" scrolling= "no" >
<frame src= "usermanage.jsp" name= "main" >
</frameset>
</frameset>
<noframes></noframes>

logout.jsp
<%@ page
Language= "Java"
Contenttype= "text/html;charset=gb2312"%>
<%
Session.removeattribute ("loginID");
Session.removeattribute ("role");
Out.println ("<script>");
Out.println ("window.top.location.href= ' index.jsp ';");
Out.println ("</script>");
%>

"dafei2599":
Upstairs

"Hanpoyangtitan":
<a href= "Login/login?action=logout" target= "_top" > Exit </a>

"look0088":
Don't quite understand ....
logout.jsp How to call ah I jump directly to logout.jsp the entire frame or only one page will jump the other is not moving AH

"look0088":
href= "Login/login?action=logout" What does this mean ...

"Hanpoyangtitan":
For example login is login detection, user log out of the servlet mapping in hyperlink set the target is the top-level frame, if _top not, try _parent

"Jspine":
Parent.location= ';

"aimer311":
You first refer to my reply,
Exit button on leftmenu.jsp, <a href= "logout.jsp" > Exit </a>

"look0088":
haha thank you for helping to solve the problem with aimer311 friend

In addition window.top.location.href= ' index.jsp '; what does this mean?
I directly use <a href= "Javascript:window.close ()" > Close the window </a> how can it not work ah ...

"aimer311":
This is to get the entire frame linked to index.jsp

"look0088":
Yes, it's a big harvest.
Haha, finally it's done:)

"Luhao":
<input type= "button" value= "Exit System" onclick= "parent.location.href= ' logoff.jsp '" >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.