PDA

View Full Version : top.location.href - referencing files one level above


inview
03-22-2003, 12:37 AM
got a site that uses 3 frames...I want to replace the document in one of the frames with another using:

"top.location.href = ".../newFrameContent.html"

this new page is not located in the same directory as the current file, but one level higher. I used the ".../" convention but it's not working.

Thx!

Quiet Storm
03-22-2003, 12:52 AM
Have you tried:

this.document.location...

Have you named each of the frames? If so, you could just target the link to that frame...

inview
03-22-2003, 01:02 AM
thx for the quick response!

I have named the frames and have tried this.document.location...however I think my problem is related to the location of the new HTML page itself.

The location of the new file physically exists in a folder just one level up on the web server. I'm trying to reference this file and it's not being found. I had used ".../" to tell the browser to go one level higher but it's not working.

Any ideas?

cheesebagpipe
03-22-2003, 01:03 AM
Isn't that the ../ convention?

beetle
03-22-2003, 01:03 AM
top.frames['frameName'].location.href = "../newFrameContent.html";

Quiet Storm
03-22-2003, 07:13 PM
Have you tried using the full URL? Just to make sure that's where the page is. ;)

inview
03-24-2003, 04:40 AM
ahhh...looky that. '../' is the answer

thanks a bunch for sparing me hours of realizing that!