Reaching a sibling frame ?????

Giganews Newsgroups
Subject: Reaching a sibling frame ?????
Posted by:  Java_Forum (hbekka…@wanadoo.fr)
Date: Thu, 4 Sep 2003

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

Replies