Click to See Complete Forum and Search --> : View Source


BestZest
02-07-2003, 01:58 PM
Is there a way you can get the source of another frame/document into a javascript varible?

BestZest

khalidali63
02-07-2003, 04:52 PM
I have never doen it,but prety sure you can do it.

give the documents body element and id

<body id="parentEl">

now from other frame access it by following the parent child relationship sequence and use the innerHTML method,

var pageHTML = document.frames["frameName"].document.getElementById("parentEl").innerHTML;

it should work I don't see a reason why not.

cheers

Khalid