JavaScript- select all

He has: 698 posts

Joined: Jul 2005

I saw a function on some site where you pushed the button and it selected all the text in the textarea. I would just look at the source code, but I can't remember what the website is.

Does anyone know the code for selecting all of the text in a box with JavaScript. If you want to know, I need it for this article (the code at the bottom):

http://graphicx.abshost.net/articles.php?view=1

Kurtis

demonhale's picture

He has: 3,278 posts

Joined: May 2005

Heres a sample code that will give you an idea...

Quote:
www.demonhale.com

A cool Site which actually is uncool to some, This text is just a sample text that will
be highlighted when selected. dwkq wejhkwjek wekjkwe wkejkwjel wejlwej ewljlj

demonhale's picture

He has: 3,278 posts

Joined: May 2005

Or visit this link for another idea...

http://javascript.internet.com/forms/select-all.html

He has: 698 posts

Joined: Jul 2005

Thanks a million! I knew it was out there. Sticking out tongue

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.