Reaching a sibling frame ?????

J

Java_Forum

hi,
here is my main html file

INDEX.JSP
-------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META name="GENERATOR" content="IBM WebSphere Studio">
<TITLE>main.html</TITLE>
</HEAD>
<frameset name = "index" cols="163,*" border="0" frameborder="no">
<frame name="menu" src="menu.jsp" noresize scrolling="no"/>
<frameset rows="30,*" border="0" frameborder="no">
<frame name="header" src="header.jsp" noresize scrolling="no"/>
<frame name="body" scrolling="yes"/>
</frameset>
</frameset>
</HTML>

what i want to do is to refresh the 'menu' frame form within the 'body'
frame.
in the body frame, i have my loggon form, when the logging succed, i display
a welcom file "welcomUser.jsp' in the 'body'. and i have created a
javascript
called at onLoad of welcomUser.jsp

WELCOMEUSER.JSP
--------------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@page import="eshop.util.*"%>
<HTML>
<HEAD>
<META name="GENERATOR" content="IBM WebSphere Studio">
<TITLE>acceuilUsert.jsp</TITLE>

<SCRIPT language="JavaScript">
function reloadMenu()
{
parent.menu.location.href = "menu.jsp";
}
</SCRIPT>

</HEAD>

<BODY onLoad="reloadMenu()">
<%
String name="";
if (session != null) {
User user = (User) session.getAttribute("user");
if (user != null)
name = user.getName();
}
%>

welcome <%= name %>
</BODY>
</HTML>

THE ERROR
---------------
parent.menu.location null object
i have tried also parent.parent.menu.location, with no success
PLEASE HELP, i have a big headache i don't understand i have drawn the
hierarchy structure!!!! i don't understand
in my opinion the hierarchy structure is as follow

FramSet-Top
Frame-Menu FrameSet
Frame-header
Frame-body

so to reach the Menu frame from the body-frame, there is tow steps to reach
FramsetTop (parent.parent), and finally to reach menu is
(parent.praent.menu)
but it doesn't work -;((((

THANKS FOR YOUR HELP
 
J

Java_Forum

i am very shamed , i have test the WelcomUser.jsp outside of its context, so
of course there is no parent
ok forget about it
 
K

kaeli

<frameset name = "index" cols="163,*" border="0" frameborder="no">
<frame name="menu" src="menu.jsp" noresize scrolling="no"/>
<frameset rows="30,*" border="0" frameborder="no">
<frame name="header" src="header.jsp" noresize scrolling="no"/>
<frame name="body" scrolling="yes"/>
</frameset>
</frameset>
</HTML>

what i want to do is to refresh the 'menu' frame form within the 'body'
frame.

<script type="text/javascript">
top.frames["main"].reload()
</script>

-------------------------------------------------
~kaeli~
Press any key to continue or any other key to quit.
Who is General Failure and why is he reading
my hard disk?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
-------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top