Użytkownik "Andrew C" <no******@total ly.made.upnapis ał w wiadomości
news:SG******** **********@news fe1-gui.ntli.net...
>
"K." <ha************ @poczta.onet.pl wrote in message
news:ej******** **@news.onet.pl ...
>Hi!
I have such code:
<textarea name="text_fiel d">very long text</textarea>
I have filled in the value of textarea field. This value is a very long
string.
I would like to scroll this textarea field into the end.
<script ...>
var longStringEleme nt = getElementById( "longString ");
...
// Whenever you want the textarea to be scrolled to the bottom, do this:
longStringEleme nt.scrollTop = longStringEleme nt.scrollHeight ;
</script>
...
<textarea id="longString" ...... </textarea>
A.
Hi again!
Unfortunately this example doesn`t work on IE.
I have created such code:
<script language=JavaSc ript>
var biografiaElemen t = document.getEle mentById("biogr afia");
var utworyElement = document.getEle mentById("utwor y");
alert(biografia Element.scrollH eight);
biografiaElemen t.scrollTop = biografiaElemen t.scrollHeight;
utworyElement.s crollTop = utworyElement.s crollHeight;
</script>
Alert gives me 0 height and I don`t know why...
Please help me.
Thank you in advance
Marcin