Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replace frame src

Status
Not open for further replies.

nicktherod

Programmer
Nov 10, 2000
19
0
0
CA
I have three frames, left menu,top header and the main content frame. Within the main content frame I have a combo box where the user can select which language he wants.

What I would like to do is send the current page within the URL to, say, the French version load in the left menu and top header frames and then replace the src for the main frame to whatever the page was in the other langauge, i.e. what has been added to the URL.

Anyone have any ideas?
 
Have one of the other pages loaded then force a load of the content page. Probably the header page, since I imagine that only loads once whereas the nav page might change as you move around the site.
 
Let be index page

<frameset rows=&quot;100,*&quot;>
<frame name=&quot;frameTop&quot; src=&quot;t.htm&quot;>
<frameset cols=&quot;100,*&quot;>
<frame name=&quot;frameLeft&quot; src=&quot;l.htm&quot;>
<frame name=&quot;frameMain&quot; src=&quot;m.htm&quot;>
</frameset>
</frameset>

To change frameTop src, from frameMain, this Javascript is a solution in IE,

top.frameTop.location.href=&quot;FILENAME.htm&quot;
parent.parent.frameTop.location.href=&quot; &quot;
or by frame index
top.frames(0).
parent.parent.frames(0).location.href=&quot; &quot;

for frameLeft src changing from frameMain,

top.frameLeft.location.href=&quot;FILENAME.htm&quot;
parent.frameLeft.location.href=&quot; &quot;
or by frame index
top.frames(1).
parent.frames(0).location.href=&quot; &quot;



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top