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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

frameElement

Status
Not open for further replies.

deluxmilkman

Programmer
Sep 26, 2007
17
0
0
JP

i have this on my main html.
HTML:
<head></head>
<frameset rows="110,*" cols="*" framespacing="0" frameborder="no" border="0" bordercolor="#FFFFFF">
  <frame src="top.html" name="top" frameborder="no" scrolling="no" id="top">
<frame src="bottom1.html" name="bottom" id="bottom">
<noframes><body>

</body></noframes>

and i would like to change the "bottom frame src" using something like this.

HTML:
function bottomChange(){
    var oFrame = window.frameElement;
    oFrame.src = "bottom2.html";
}

now if im writing this function on "top.html" what "window.frameElement" section should be?
 
Can you not give the bottom frame an id, then use document.getElementById() to target it (instead of trying to figure out what oFrame ought to be).

Just a thought!

Cheers,
Jeff

[tt]Jeff's Blog [!]@[/!] CodeRambler
[/tt]

Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!

FAQ216-6094
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top