Click to See Complete Forum and Search --> : Read innerHTML across frames


kimoo
April 25th, 2008, 02:37 PM
Hello all,

The question is simple but the solution i can't find..

I have 2 frames.

I need to read the innerHTML from a <div> in Frame1 but clicking a button on Frame2

how do you do that?? had been trying out the whole day.. driving me crazy..

thanks in advance guys

kimo

PeejAvery
April 25th, 2008, 04:37 PM
Two methods can be used.

parent.framename.document.getElementById('div_id').innerHTML
Or...

parent.document.getElementById('frame_id').document.getElementById('div_id').innerHTML

kimoo
April 25th, 2008, 05:35 PM
oh man.. life saviour.. both working perfect..