Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scrolling textarea on page load

Status
Not open for further replies.

SlykFX

Programmer
Oct 12, 2002
76
GB
i beleive this is the corect forum for this but im not sure (i do very little JavaScript, when i cant avoid it)

the short question is:
how do i automatically scroll to the bottom of a textarea element when the page loads?

i believe i need to use "scrollIntoView(false)", but im not sure on how or where to use it.

can someone please advise me thanks :)

I can't be bothered to have a sig!
 
no worries, ive got it sorted now :)

I can't be bothered to have a sig!
 
Might I ask how you did it??


"Why is it always the quiet ones?"

Robert Carpenter
questions? comments? thanks? email me!
linkemapx@hotmail.com
AIM & MSN: robacarp
 
For IE:
Code:
<html>
<head>
<script language=&quot;JavaScript&quot;>
	function scrollTextarea(){
		the_text = document.myForm.myTextarea.createTextRange();
		the_text.scrollIntoView(false);
	}
</script>
</head>
<body onLoad=&quot;scrollTextarea()&quot;>
	<form name=myForm>
		<textarea name=myTextarea cols=25 rows=7><%=results%>
	</form>
</body>
</html>

that doesnt seem to work on NN, so im still reading for a solution :(

I can't be bothered to have a sig!
 
okay...I was thinking you found a crossbrowser soloution....


&quot;Why is it always the quiet ones?&quot;

Robert Carpenter
questions? comments? thanks? email me!
linkemapx@hotmail.com
AIM & MSN: robacarp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top