General discussion

Locked

HTML/JAVASCRIPT updating multiple frames

By EIRA ·
I am developing a web pages in HTML. My problem is that I do use nested frames,
and from a link on my "menu" frame in one nesting level I am not able to update frames in another level.(I do not want to create a lot of frameset files to solve this because it will make my pages more complicated and take away some of the point in using frames; I then have to update all frames on the screen.)

I Do have A Javascript that almost work, and I guess that the solution has something to do with replacing the "parent" word.
Please help me :-)

*************
<A HREF="javascript:location='meny.htm';

<!--This line is OK!-->
parent.hoved.location='velkommen.htm';

<!--This line is trouble!-->
parent.top.location='top_hovedsiden.htm'"> hovedsiden
</A>
*************


P.S.
*****************************************
Here are some of the content in my "frame" page. My problem is to change the content in "top" and "rute" from a link on the "meny" frame.

<FRAMESET ROWS="200,*,100" BORDER=0>

<FRAMESET COLS="230,500" BORDER=0>
<FRAME NAME="rute" SRC="htmlfiler/rute.htm" MARGINWIDTH=0 MarginHeight=13>
<FRAME NAME="top" SRC="htmlfiler/top_ansatte.htm" MARGINWIDTH=0 MarginHeight=10>
</FRAMESET>

<FRAMESET COLS="170,500" BORDER=5>
<FRAME NAME="meny" SRC="htmlfiler/meny.htm" MARGINWIDTH=0 MarginHeight=10>
<FRAME NAME="hoved" SRC="htmlfiler/hovedsiden.htm" MARGINWIDTH=0 MarginHeight=10>
</FRAMESET>

<FRAME NAME="banner" SRC="htmlfiler/banner.htm" MARGINWIDTH=0 MarginHeight=10>
</FRAMESET>
*****************************************

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

HTML/JAVASCRIPT updating multiple frames

by kevin.riggs In reply to HTML/JAVASCRIPT updating ...

The line you say is in trouble is using a Key word or a Reserved word to name a frame. The word "top" refers to the initial "frameset" frame. Changing the webpage (url) for any frame.top means changing to have a non-framed webpage. Sounds like you just used the name "top" to refer to a frame that goes across the top of the browser window, just under the button bar and navigation bar. You may find that your code works if you just change the name and any references from "top" to "top_banner" or something like that.

Collapse -

HTML/JAVASCRIPT updating multiple frames

by EIRA In reply to HTML/JAVASCRIPT updating ...

Thank you Kevin.
It was the reserved word "top" together with a missing ";" at the end of the javascript that gave me trouble.
It now works fine.
:-)

Collapse -

HTML/JAVASCRIPT updating multiple frames

by Cedric King In reply to HTML/JAVASCRIPT updating ...

I would agree with what the answer posted about 'top' being a reserved word. But if it doesn't work for you, you can try encapsulating the <FRAMESET COLS="230,500" BORDER=0> and <FRAMESET COLS="170,500" BORDER=5> in <FRAME... > and refer to it accordingly though I think it might not be the reason too. Sorry I am unable to test it out but it should give you a guideline on solving it.
Regards.

Collapse -

HTML/JAVASCRIPT updating multiple frames

by EIRA In reply to HTML/JAVASCRIPT updating ...

I do not understand your suggestion. As far as I can see I have already encapsulated the frames.
But thank you anyway.

Collapse -

HTML/JAVASCRIPT updating multiple frames

by EIRA In reply to HTML/JAVASCRIPT updating ...

This question was closed by the author

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums