[thelist] iframe as big as necessary?

Kasimir K evolt at kasimir-k.fi
Tue Mar 30 08:35:46 CST 2004


>> Yes, but the page in iframe can read its own 
>> document.body.offsetHeight, and call function in parent.

> Nope. Seen from page B, page A is from a different server, and therefore 
> page B is not allowed to execute any of its functions.

damn, you are right, I forgot that...

but if the document in iframe *is* on server A, and it contains the 
necessary javascript, and also reads in stuff from a file on server B. 
in php I would do something like:

$news_source = '';
$file = fopen("http://www.B.com/news.aspx", "r");
if (!$file) die("unable to access news server");
while (!feof($file))
{
    $news_source .= fgets($file);
}
fclose($file);

and then clean up and do things with the $news_source.

this would also allow fetching the news content from other servers too, 
and using the same javascript with them.

would this work?

.k






More information about the thelist mailing list