469,604 Members | 2,381 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,604 developers. It's quick & easy.

How to select the first line in textarea?

Hi,
Anyone how could I select the first line in the <textareaafter page
load?
I have done after clicking on the textarea, but this isn't good I must
have after load :(

bye
Jan 27 '08 #1
4 3164
On Jan 27, 1:52*pm, laziers <lazi...@gmail.comwrote:
Hi,
Anyone how could I select the first line in the <textareaafter page
load?
I have done after clicking on the textarea, but this isn't good I must
have after load :(

bye
How did you do it by clicking?

Just do the same thing, except instead of onclick, do
onload="whatEverYouWerDoingBefore()"

But what will be in the textarea when the page loads?
Jan 27 '08 #2
1. <body onload="...">
2.http://www.google.com/search?q=textarea+line+select
ok thats fine, but I cant do this in body :(

Jan 27 '08 #3
On Jan 28, 7:58 am, laziers <lazi...@gmail.comwrote:
1. <body onload="...">
2.http://www.google.com/search?q=textarea+line+select

ok thats fine, but I cant do this in body :(
Do you not have control of the body element directly? If not, perhaps:

window.onload=function()
{
...
}
Jan 27 '08 #4
On 27 Sty, 23:18, "liamge...@gmail.com" <liamge...@gmail.comwrote:
On Jan 28, 7:58 am, laziers <lazi...@gmail.comwrote:
1. <body onload="...">
2.http://www.google.com/search?q=textarea+line+select
ok thats fine, but I cant do this in body :(

Do you not have control of the body element directly? If not, perhaps:

window.onload=function()
{
* * ...

hmm maby this will work, thx
Jan 28 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Ganco | last post: by
9 posts views Thread by Prowler | last post: by
5 posts views Thread by joelbyrd | last post: by
1 post views Thread by Jan Doggen | last post: by
6 posts views Thread by Vortexmind | last post: by
1 post views Thread by impostor | last post: by
reply views Thread by guiromero | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.