PDA

View Full Version : can't get new Height after set innerHTML in IE4


kimpixel
25.06.2001, 17:35
with this script i try to load a external file in a layer. after loading the content, i need to recive the new height of the layer.
it works good on all browsers but the ie4 makes a lot of problems. it dont give me the new height before i leave the script and start it again. i think there is a big bug in ie4.

see yourself

http://www.kimpixel.de/temp/df20/index.htm

please help

kimPixel

Versatil
25.06.2001, 20:02
I don't kno how you're testing in IE4 ... I don't know anyone who has it... but after looing at your code I'm assuming offsetHeight and clip.rect.bottom didnt work
maybe style.height?
or maybe im not helping at all here =(

paul
26.06.2001, 14:08
try putting it in an eval() tag like this:

<pre id=code><font face=courier size=2 id=code>eval(div.offsetHeight)</font id=code></pre id=code>

this should evaluate it. and the offsetHeight should work in ie cos i think its microsoft's and not dom.

paul

kimpixel
26.06.2001, 15:17
hello Paul

sorry it dosn't work.
but i must this script make work. its very importend for me.

i think that my website must run on ie4.

now i isolate my problem and its still the same:

<pre id=code><font face=courier size=2 id=code><html><head>
<script language="JavaScript" type="text/javascript">
function left (){

if (document.all){

document.all["content_left"].innerHTML = "hallo welt

warum funktioniert diese scheise nicht";

new_height = document.all["content_left"].clientHeight

alert (new_height)
}
}
</script>

news (javascript:left())
<div id="klip" style='position:absolute; left:72; top:132; width:244; height:253; clip:rect(0,244,253,0); background-color:#F4F4F2; layer-background-color:#F4F4F2; visibility:visible;' ><div id="content_left" style="position:absolute; left:0; top:0; width:244; background-color:#F4F4F2; layer-background-color:#F4F4F2; visibility:visible;"></div></div>
</body></html></font id=code></pre id=code>

how can i made a window with a scrollbar that load its content from a external file..???

paul
26.06.2001, 15:41
it should work with the offsetHeight like this:

<pre id=code><font face=courier size=2 id=code>new_height = eval(document.all["content_left"].offsetHeight);</font id=code></pre id=code>

i don't know what your trying to do. include an external news file? if it is to be updated online via a browser it is best to use php and maybe a mySQL database if the news file is big. other than that all i can think of is an iframe but this doesn't work in ns4 so i don't know.

paul

kimpixel
27.06.2001, 15:16
i got it !

scrollHeight is it <img src=icon_smile_wink.gif border=0 align=middle>