By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,504 Members | 1,194 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,504 IT Pros & Developers. It's quick & easy.

Reaching a sibling frame ?????

P: n/a
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
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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

"Java_Forum" <hb******@wanadoo.fr> a écrit dans le message de news:
bj**********@news-reader3.wanadoo.fr...
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

Jul 20 '05 #2

P: n/a
In article <bj**********@news-reader3.wanadoo.fr>, hb******@wanadoo.fr
enlightened us with...
<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
-------------------------------------------------
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.