faqts : Computers : Programming : Languages : JavaScript : DHTML

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

5 of 6 people (83%) answered Yes
Recently 1 of 2 people (50%) answered Yes

Entry

How can I transfer the content of page, periodically refreshed, to a table cell in another frame?

Feb 7th, 2003 03:07
Klaus Bolwin, Rogerio Vianna,


the following code is just an idea, how it should work, however it is
not tested:


the body-tag of the file in the first frame (that to be refreshed) must
contain the following event:

onload="top.counter++; top.savecontent()"

the frameset file must contain the following code:

var counter = 0;

function savecontent()
{
content = frame1.document.body.innerHTML;
frame2.cells[counter].innerHTML = content;
}

the body-tag of the file in frame2 (containig the table) should contain
the following event:

onload="cells=document.getElementsByTagName('td');"