web form text box

  • Thread starter Thread starter Rob Webster
  • Start date Start date
R

Rob Webster

Anyone know how to scroll a server multiline text box to the end of it's
contents after it's been updated?
 
Hi,

I havent done this ever, don't know if it can be done, IF it can be done
you will have to do it in javascript, so my best advice is that you google
it in some javascript related NG, if you find the answer please post it back
for the record :)


Cheers,
 
This wee bit of JavaScript seems to do the job in some browsers..

function scrollElementToEnd (element) {
if (typeof element.scrollTop != 'undefined' && typeof
element.scrollHeight != 'undefined') {
element.scrollTop = element.scrollHeight;
}
}

I changed from using a textbox to using a DIV with a Literal it, allowing me
to make the text displayed look nicer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top