SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2007
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up frameElement question

    i have this on my main html.
    HTML Code:
    <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 Code:
    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?

  2. #2
    SitePoint Wizard gRoberts's Avatar
    Join Date
    Oct 2004
    Location
    Birtley, UK
    Posts
    2,439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if they have id's you can reference them directly using javascript and set the location.

    ie

    Code:
    document.getElementById('top').window.location = 'top.html'



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •