Hi guys!
I think i did it! Well, if someone is interested, here is the code:
<script>
function doIt(fil){
ifra=document.all.iframename
ifra.src=fil
setTimeout('waitin()',0)
}
function waitin(){
if (frames.iframename.document.readyState == 'complete') { setTimeout('puting()',0) }
else setTimeout('waitin()',10)
}
function puting(){
var obj=self.frames.iframename.document.body
document.all.Layer2.innerHTML=obj.innerHTML
}
</script>
& there also must be iframe called iframename on the page and layer called Layer2
<div id="Layer1" style="position:absolute; left:423px; top:71px; width:300px; height:27px; z-index:1; ">
<form>
loadin file1<input type=button value='click here' onclick='javascript:doIt("file1.htm"
' ><br>
loadin file2<input type=button value='click here' onclick='javascript:doIt("file2.htm"
' >
</form>
</div>
<div id="Layer2" style="position:absolute; left:12px; top:368px; width:661px; height:140px; z-index:2">
<center><strong><font color='red'>here the new content will appear (may be, on the 2nd time)</font></strong></center>
</div>
<iframe style="display:block" name=iframename id=iframename src=""></iframe>
style="display:block" – just 2 see that content HAS been loaded; u can hide this iframe, and this eggzactly is what i was doin it for.(sorry for my english)
try it yourself, i got it to work on my computer, (win98, ie5.0) as for now i cant upload it on the NET, ‘coz my connection is xtrmly slow. Culd u guyz check it & tell me if it doesnt work on Inet?
And btw, culd anybody xplain me, why am i 2 use such construction
setTimeout('puting()',0) – without it it doesnt want 2 work properly (& like i told before, without this stuff it works only from the second attempt)