- Sep 9, 2002
- 216
- 0
- 71
I have 3 frames One is navigation frame, another frame (called source) where I have a <textarea> and then I have a content frame.
The navigation frame has a function to display source code into textarea in "source.htm".
function displayCode()
{
var sSource = "<html>" + parent.Content.document.getElementsByTagName('HTML')[0].innerHTML + "</html>";
parent.source.sourceCode.value = sSource;
}
which can write the source code of the content frame into the <TEXTAREA> of the left column frame (source). This works wonderfully when loading the Local content, but if the content frame loads an external page, the source code button doesn't work anymore.
So: parent.Content.document.body.outerHTML gets me the source code for Content; the question is how can I make it to where "Content" can be any page I visit? (I tried inserting Google in place of Content, (parent.Google.document.body.outerHTML Since Google is Google's title) and visited content in the display Pane, that didn't work)
I figured maybe somehow getURL (or some kind of function or some trick that could be used across platforms ) into a variable on the navigation? But how to get it form the "Content" frame, into the navigation frame?
Anyone, help?
Thanks in Advances
The navigation frame has a function to display source code into textarea in "source.htm".
function displayCode()
{
var sSource = "<html>" + parent.Content.document.getElementsByTagName('HTML')[0].innerHTML + "</html>";
parent.source.sourceCode.value = sSource;
}
which can write the source code of the content frame into the <TEXTAREA> of the left column frame (source). This works wonderfully when loading the Local content, but if the content frame loads an external page, the source code button doesn't work anymore.
So: parent.Content.document.body.outerHTML gets me the source code for Content; the question is how can I make it to where "Content" can be any page I visit? (I tried inserting Google in place of Content, (parent.Google.document.body.outerHTML Since Google is Google's title) and visited content in the display Pane, that didn't work)
I figured maybe somehow getURL (or some kind of function or some trick that could be used across platforms ) into a variable on the navigation? But how to get it form the "Content" frame, into the navigation frame?
Anyone, help?
Thanks in Advances
