Solved

Unselect textarea...

Posted on 2006-07-13
2
1,176 Views
Last Modified: 2008-02-01
I have a bit of JS
  theForm.body.value=theForm.body.value.split(sel).join(url+' ')

that modfiies the contents of a text area, problem is that once its done all the text in the textarea is selected. Is there a way to unselect the textarea automatically when its done?
0
Comment
Question by:fox_statton
  • 2
2 Comments
 
LVL 30

Expert Comment

by:third
ID: 17099137
try to call

theForm.body.focus()

or focus to any other field on the form.
0
 
LVL 30

Accepted Solution

by:
third earned 500 total points
ID: 17099235
another way is to blur from you field

theForm.body.blur()

but of course blurring will lose focus to your textarea.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jQuery Parallax 1 38
Angular - why did removing "track by" worked? 6 28
In Angular, how can I programatically fire a function 8 54
Reference Error with plugin 1 30
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now