Loading new content into a frame

Results 1 to 2 of 2

Thread: Loading new content into a frame

  1. #1
    Join Date
    Dec 1969

    Default Loading new content into a frame

    I have a 2 frame page, with a small frame at the top and larger one below. The page for the larger frame has a function to load a new page into the top frame one the bottom page has finished loading. Here&#039s the code:<BR><BR>function loadLocations()<BR>{<BR> parent.frames[0].location.href = "locations.asp";<BR>}<BR><BR>and the onLoad from the body tag:<BR><BR>onLoad="loadLocations();"<BR><BR>The problem is this, the new page loads below the page already in the top frame, so that you&#039d have to scroll down to see the content. I&#039ve tested this on several different machines thinking it was something wrong with mine, but they all do the same thing. The original content is not being removed from the top frame before the new content is loaded. What am I leaving out or doing wrong?<BR><BR>Thanks in advance for your assistance.<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Loading new content into a frame

    What kind of browser are using? I had no problems with your example in Netscape/IE.<BR><BR>If you set the top frame to initially have &#039locations.asp&#039 and then run the script do you end up with 2 locations.asp displayed in the top frame?<BR><BR>Perhaps you could try:<BR> parent.frames[0].document.location = "locations.asp";<BR>OR<BR> parent.frames[0].location.replace("Locations.asp");

Posting Permissions

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