wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes html frames issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "html frames issue" Watch "html frames issue" New topic
Author

html frames issue

Kajolsingh Kajolsingh
Greenhorn

Joined: Mar 01, 2003
Posts: 5
Hello,
Can someone please help me with the issue I have with frames:
Issue: I have three frames on a web page and I display three jsp pages in each frame.
The frames work o.k., but sometimes the contents of the frames are overlapping. i.e contents of one frame appear on the other.
This happens when I hit refresh a couple of times or when I click on back button.
code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<%-- index.jsp --%>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<META name="GENERATOR" content="IBM WebSphere Studio">
</head>
<frameset framespacing="0" border="1" rows="111,*" frameborder="0" name="mainframe">
<frame name="headerframe" noresize scrolling="no" src="\\HEADING.jsp"" scrolling="no" noresize>
<frameset cols="300,500" frameborder="0">
<frame name="navframe" scrolling="auto" noresize target="mainFrame" src="PAGE=NAVIGATION.jsp">
<frame name="mainFrame" noresize src="PAGE=MAIN.jsp" scrolling="auto">
</frameset>
<noframes>
<body><p>This page uses frames, but your browser doesn't support them.</p></body>
</noframes>
</frameset>
</html>
Thank you,
Kajol
sunitha reghu
Ranch Hand

Joined: Dec 12, 2002
Posts: 937
Hi Kajol,
frst of all with noframes its not recommended to write ur browser doesnt support frames
<noframes>
<body><p>This page uses frames, but your browser doesn't support them.</p></body>
</noframes>
coz section 508 doesnt allow that. so u have a give another link to redirect the users with a page that doesnt uses frames.
The frames behave different way in diff browsers. so check that
src="\\HEADING.jsp"" ---two not needed ""
remove that and check
most of the attribute u have used for framset are deprecated.
Scott Duffy
Author
Ranch Hand

Joined: May 23, 2002
Posts: 58
Hi Kajol,
1) As sunitha mentioned, there is a typo:
src="\\HEADING.jsp""
which should be:
src="HEADING.jsp"
2) There is a couple of duplicate attributes:
<frame name="headerframe" noresize scrolling="no" src="HEADING.jsp" scrolling="no" noresize>
" scrolling="no" noresize " is repeated twice.
3) You've named your frameset:
<frameset framespacing="0" border="1" rows="111,*" frameborder="0" name="mainframe">
While your third frame is confusingly named "mainFrame". That might be causing you problems in some browsers -- who knows?. Remove the name from the frameset.
4) framespacing, border and frameborder are not valid attributes of a "frameset" tag.
5) target is not a valid attribute for "frame" either.
Best of luck. If you want to email me your new frameset if it's still not working, feel free.


Scott Duffy<br />:: MCSD, SCJP, IBMXML<br />:: Author of <a href="http://www.xguru.com/tutorial/cat_index.asp?cat=5" target="_blank" rel="nofollow">IBM XML Certification Guide</a><br />:: Author of <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0072228873" target="_blank" rel="nofollow">How to Do Everything in JavaScript</a>, Osborne Press
Kajolsingh Kajolsingh
Greenhorn

Joined: Mar 01, 2003
Posts: 5
Scott & Sunitha,
Thank you for your help.
I completed all the changes you both suggested, but the problem of overlapping frames still exists.
Sometimes when I refresh the page or click on the back button, the contents of one frame appear on the other frame.
Here is the modified code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<%-- index.jsp --%>
<%@ include file="../jsp/checkpage.jsp" %>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<META name="GENERATOR" content="IBM WebSphere Studio">
<title>EXAMPLE</title>
</head>
<frameset rows="111,*">
<frame name="headerframe" noresize scrolling="no" frameborder="0" src="header.jsp">
<frameset cols="300,500">
<frame name="navframe" scrolling="auto" noresize frameborder="0" src="navigation.jsp">
<frame name="mainFrame" scrolling="auto" noresize frameborder="0" src="main.jsp">
</frameset>
</frameset>
</html>
I appreciate all your help in solving this issue.
Thanks,
Kaj
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: html frames issue