Reframing a given page in a new frameset using javascript -- frames[0] goes to new location, but can

W

Weston

I'd like to be able to use javascript to take a given non-framed page,
and reload it in the context of a frameset which has the original
given page in a frame on the left, plus a narrow-column frame to the
right of it, with content in the right frame drawn from the DOM of the
original given page.

I've been working on a small proof of concept you can see here:

http://weston.canncentral.org/web_lab/reframe/simpletest.html

which seems to work ... up to a point. I create a new frameset, add
two frame children to it using the dom, delete the 'body' child of the
html element, and append the new frameset to the html element.

Then I set frames[0].location to the location of the original
document. And this is where things start to get weird.

Because even though frames[0] clearly is going there (as you can see
in the example), the location variable seems to think that it's
pointed at "about: blank" (in the test example I've pointed at above,
I actually write frames[0].location to the right-hand frame, and
that's what it gives me).

Can anyone explain this behavior and/or point me to better means of
reaching my goal?

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top