PDA

View Full Version : HTML,windows and frames


bismillah
March 15th, 2006, 07:15 PM
Hello,
Can anyone tell me how to update a frame from a link outside the frame in an other window.
From top frame i want to open a window itself and from that window clicking on links to open contents in botton frame(top frame=10%, bottom=*).

Thanks in advance

degsy
March 15th, 2006, 07:24 PM
There are a couple of methods.

parent.frames['framename'].location.href='http://www.google.com'
or
parent.framename.location.href=...


lots of info here
http://www.irt.org/script/frame.htm

bismillah
March 16th, 2006, 02:55 AM
Hello again,

Please can you give a tiny example of it because i have not been working with HTML for long.I don't get it how i would incorporate code to redirect a page back to main frame.

Open a window from top frame and from that window open a link into bottom frame while that window shrinks upon link openning and becoming active and can be refered to if need to open another link into bottom frame again.
I feel ediot but please help me.

degsy
March 16th, 2006, 10:02 AM
You will have to post your current code

bismillah
March 17th, 2006, 02:14 AM
Hello,

This is just an example of code i will be using

*loaded page*
<FRAMESET ROWS="20,*,12" FRAMEBORDER=0 BORDER=0 >
<FRAME NAME="top" SRC="yellow1.html" MARGINHEIGHT=0 MARGINWIDTH=0 SCROLLING=NO NORESIZE>
<FRAMESET COLS="15,*,25" FRAMEBORDER=0 BORDER=0 >
<FRAME NAME="left" SRC="blue1.html" MARGINHEIGHT=0 MARGINWIDTH=0 SCROLLING=AUTO NORESIZE>
<FRAME NAME="main" SRC="red.html" MARGINHEIGHT=0 MARGINWIDTH=0 SCROLLING=1 NORESIZE>
<FRAME NAME="right" SRC="cyan.html" MARGINHEIGHT=0 MARGINWIDTH=0 SCROLLING=AUTO NORESIZE>
</FRAMESET>
<FRAME NAME="bottom" SRC="green.html" MARGINHEIGHT=0 MARGINWIDTH=0 SCROLLING=NO NORESIZE>
<NOFRAMES>
Use this section to tell surfers using older browsers that:<BR>
1) Your browser is incapable of Frames, so they should consider upgrading to a newer version.. or<BR>
2) Add a link to a version of your site that doesn't use frames.
</NOFRAMES>
</FRAMESET>

*yellow1.html*

<body topmargin="0" leftmargin="0" bgcolor="#A06AA0">
<table><tr><td nowrap>
[<a href="my.html" target="_blank"><font color="#ffffff">my doc</font></a>]

[<a href="your.html" target="_blank"><font color="#ffffff">your doc</font></a>]
.
.
.
.
.
.
so and so forth.
</td></tr></table>


*my.htm*

<BODY TEXT="#000000" LINK="black" VLINK="BLACK" ALINK="#FF301F">
<BODY BGCOLOR="#99CC99">

<table border="0" cellpadding="5" cellspacing="5" width="100%">

<tr align="center"><td><a href="../index.html"><u>Home Page</u></a></td><td></tr><br><b><font size="1"><div align="center">bla bla</div></font></b>
</table><br>
<center><font size="6" color="cc0033"><strong><u>Full Screen</u></strong></font></center><br><br><br>
<table width="100%" border="0" align="center" summary="">
<tr>
<td><a href="http://www. want to open in main red.html(middle frame)" target="main window"><b><font color="#ffff00"><u>Debate</u></font></b></a></td>
<td><a href="http://www. want to open in main red.htm(middle frame)" target="main window"><b><font color="#ffff00"><u>Debate</u></font></b></a></td>
<td><a href="http://www. want to open in main red.htm(middle frame)" target="main window"><b><font color="#ffff00"><u>Debate</u></font></b></a></td>
<td><a href="http://www. want to open in main red.htm(middle frame)" target="main window"><b><font color="#ffff00"><u>Debate</u></font></b></a></td>
</tr>
<tr>
<td><a href="http://www. want to open in main red.htm(middle frame)" target="main window"><b><font color="#ffff00"><u>Debate</u></font></b></a></td>
<td><a href="http://www. want to open in main red.htm(middle frame)" target="main window"><b><font color="#ffff00"><u>Debate</u></font></b></a></td>
<td><a href="http://www. want to open in main red.htm(middle frame)" target="main window"><b><font color="#ffff00"><u>Debate</u></font></b></a></td>
<td><a href="http://www. want to open in main red.htm(middle frame)" target="main window"><b><font color="#ffff00"><u>Debate</u></font></b></a></td>
</tr>
<tr>
.
.
.
.
so on and so forth
</tr>
</table>


(My.html and your.html are windows opened from top frame(yellow1.html).They contian links which upon clicking redirect and open content in main which is red.html.i need code that will accomplish only for this section. )


* cyan.html*
<BODY BGCOLOR="#A06AA0">
</BODY>

* blue1.html*
<BODY BGCOLOR="#A06AA0">
</BODY>

*green.html*
<BODY BGCOLOR="#A06AA0">
</BODY>

*red.html*
<BODY BGCOLOR="#000000" valign="top">
</BODY>

Thank you

degsy
March 17th, 2006, 10:06 AM
You need to reference your frame name
change target="main window" to
target="main"