Connecting Tech Pros Worldwide Help | Site Map

Reaching a sibling frame ?????

Java_Forum
Guest
 
Posts: n/a
#1: Jul 20 '05
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


Java_Forum
Guest
 
Posts: n/a
#2: Jul 20 '05

re: Reaching a sibling frame ?????


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" <hbekkali@wanadoo.fr> a écrit dans le message de news:
bj7pt0$crr$1@news-reader3.wanadoo.fr...[color=blue]
> 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[/color]
display[color=blue]
> 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[/color]
reach[color=blue]
> FramsetTop (parent.parent), and finally to reach menu is
> (parent.praent.menu)
> but it doesn't work -;((((
>
> THANKS FOR YOUR HELP
>
>[/color]


kaeli
Guest
 
Posts: n/a
#3: Jul 20 '05

re: Reaching a sibling frame ?????


In article <bj7pt0$crr$1@news-reader3.wanadoo.fr>, hbekkali@wanadoo.fr
enlightened us with...[color=blue]
> <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.[/color]

<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
-------------------------------------------------
Closed Thread