dcsimg
Setting a scrollbar to the top of a textarea window
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Troy_K
Posted On:   Tuesday, February 4, 2003 10:46 PM

I have a website with a page of thumbnails that when clicked will write the relevant text for the chosen/clicked thumbnail into a textarea using a series of 'document.screen.message.value =' onclick message()functions. My problem is this; I click on an image and read the corresponding text, and in most cases scrolldown to read to the bottom of the textarea. When I click on another image the textarea scrollbar remains at the bottom for the new text entry! Is there a function I can attach to the onclick of each image to send the scrollbar back up to the top of the textarea window? (or any other solution?) ps For design/layout reasons I'd like to keep the textarea at its current size and hence need to have a scrollba   More>>

I have a website with a page of thumbnails that when clicked will write the relevant text for the chosen/clicked thumbnail into a textarea using a series of 'document.screen.message.value =' onclick message()functions.

My problem is this;

I click on an image and read the corresponding text, and in most cases scrolldown to read to the bottom of the textarea. When I click on another image the textarea scrollbar remains at the bottom for the new text entry!

Is there a function I can attach to the onclick of each image to send the scrollbar back up to the top of the textarea window? (or any other solution?)

ps For design/layout reasons I'd like to keep the textarea at its current size and hence need to have a scrollbar :)

   <<Less

Re: Setting a scrollbar to the top of a textarea window

Posted By:   Troy_K  
Posted On:   Wednesday, February 5, 2003 01:16 AM

Its OK, I figured it out. Just needed to add the line 'document.screen.message.scrollTop=0' to set the scrollbar to the top of the textarea window.
About | Sitemap | Contact