How do i redirect from an iner frame

Okay… here is my problem… I am making a site on asp these days… the problem is that i need to redirect from an inner frame to the parent window…
i have tried this through asp but since my knowledge of that is very limited… i can’t get it to work…

Please advise…

can you post the frames.html you have? basically, you can target any frame if you have identified it in your frame html wrapper.

– sample (cut and paste it from my site).
<frameset rows=“70,,60" border=“0” frameborder=“0”
frameborder=“no” framespacing=“0”>
<frame name=“banner” scrolling=“no”
noresize target=“main” src=“header.htm”>
<frameset cols="150,
<frame name=“contents” target=“main” src=“nav.htm”>
<frame name=“main” src=“Body.htm”>
<frameset cols=“150,*”>
<frame name=“bottomNav” target=“main” src=“bottomnav.htm” scrolling=“no” noresize>
<frame name=“bottmMain” src=“bottomMain.htm” scrolling=“no”>
– end sample

now the name is important so that when you try to redirect a link like “<a href=“goto.asp” target=“main”>” this would redirect the page using the Main frame of the site.

hope this helps.


here the html of the frames… My problem is that i want to redirect to the parent page…
<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1”>

<frameset rows=“56,,7" frameborder=“NO” border=“0” framespacing=“0” cols="”>
<frame name=“topFrame” scrolling=“NO” noresize src=“toping.asp” >
<frameset cols=“124,,179" frameborder=“NO” border=“0” framespacing=“0” rows="”>
<frame name=“leftFrame” scrolling=“no” noresize src=“left.htm”>
<frame name=“mainFrame” src=“productmain.htm” scrolling=“yes” noresize target=“parent”>
<frame name=“rightframe” src=“productright.htm” scrolling=“no”>
<frame name=“bottomFrame” scrolling=“NO” src=“bottom.htm”>
<noframes><body bgcolor=“#FFFFFF”>


I am not quite sure of the implications of trying to get a server side language to redirect the parent page from within a frame - but needless to say it’s not possilble.
The Actions of the parent and the children are controlled by the dom, which is clientside - and only possibly controlled by direct actions / Scripting - or in an extreme case remote or pseudo remote scripting. In the case of the later it’s a request->response scenario anyway.

However if you want to use javascript to redirect the parent from a child frame - then you’d use top.window.href - i think … if you want to check this is right - alert it before trying it - and make sure the url is that of the top window (probably index.html)

Hope this helps.
If you want more info - specify more… :slight_smile:


i found a solution for the problem… thanks everyone.

function func()
<body onLoad=“func()”>

thank you all

good - except you don’t need it in a funciton, and you don’t need to call it.

just a page saying:

would do it …