Page 1 of 1

Accessing <frame> from within frameset

Posted: Wed Jan 28, 2009 10:37 am
by alex.barylski
I have some JS which reside in a file that is the the first frame of a frameset:

[js]var website = window.parent.document.getElementById('website').window;[/js]

Everything up to the .window returns a valid object (HTMLFrameElement).

I need to change some elements in the in the second frameset from within the first, at the very least I need to be able to change the URL of the second frameset from within the first.

Both framesets are hosted on the saome domain so I believe I have the ability to manipulate the DOM which might be helpful but for now just changing the URL of the second will be enough, if I can figure out how to go further than above???

Re: Accessing <frame> from within frameset

Posted: Wed Jan 28, 2009 10:41 am
by alex.barylski
Turns out contentWindow was the other object I needed...unless there is a better way?

p.s-Using jQuery hopefully.