Monday, February 28, 2011

Using frameset and frames to create a header, table of contents and a content pane.

Using frameset and frames to create a header, table of contents and a content pane.

-------------------------------------------------
header
-------------------------------------------------
table of| content area
contents|
-------------------------------------------------


use the below html code to create a header, table of contents and a content pane. using frames is ideal as the the applications urls are displayed in the table of contents part and when clicked the application content will be displayed in the content area.

in the toc jsp wherever the application links are being displayed use the
<a href="#" target="contents"> This means open the url in the area specified by 'target' attribute which is our contents section.

<html>
<head>
<title>My Portal</title>
</head>
<FRAMESET ROWS="10%, *" border=0 spacing=0 frameborder=0 framespacing=0>
<FRAME SRC="<%=request.getContextPath()%>/header" NAME=TITLE border=0 marginwidth=0 marginheight=0 spacing=0 frameborder=0 framespacing=0/>
<FRAMESET ROWS="50%" COLS="18%,*" FRAMEBORDER=NO FRAMESPACING=0 BORDER=0>
<FRAME SRC="<%=request.getContextPath()%>/toc" NAME=toc border=0 marginwidth=0 marginheight=0 spacing=0 frameborder=0 framespacing=0/>
<FRAME SRC="<%=request.getContextPath()%>/contents" NAME=contents border=0 marginwidth=0 marginheight=0 spacing=0 frameborder=0 framespacing=0/>
</FRAMESET>
</FRAMESET>
</html>

No comments: