I need to have a zero height iframe that changes its height and show
the content of a file if it does exist on the server.
I need to check every so often(a minute or so) the existance of the
file.
How can I do this ?
any example is highly appreciated
See below for an example approach. It's impossible to say whether
this will work for your situation without knowing more about it (ie.
Are the files yours? Can you edit them? If so, dynamic resizing may
be possible).
Csaba Gabor from Vienna
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>PHP Output result page</title></head>
<body bgcolor=yellow style=margin-left:.4in>
<script type='text/javascript'>
function elem(txt) { return document.getElementById(txt); }
</script>
<form name=myform method=get action="" target=myframe>
<button type=button accesskey=o
onclick="elem('myframe').src='
http://google.com'">
G<u>o</u>ogle</button>
<button type=button accesskey=a
onclick="elem('myframe').src='
http://eBay.com'">
eB<u>a</u>y</button>
<button type=button accesskey=l
onclick="elem('myframe').src='about:blank'">
B<u>l</u>ank</button>
</form>
<iframe id=myframe name=myframe src="about:blank"
onload="
var src=this.src, style=this.style;
if (src=='
http://google.com/') {
style.height='4in';
style.width='6in'; }
else if (src=='
http://ebay.com/') {
style.height='8in';
style.width='10in'; }
// this.style.visibility=(this.src!='about:blank') ?
// 'visible' : 'hidden';
style.display=(src!='about:blank') ? '' : 'none';
">
</iframe><br>
End of page
</body></html>