Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1233
  • Last Modified:

Unselect textarea...

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
fox_statton
Asked:
fox_statton
  • 2
1 Solution
 
thirdCommented:
try to call

theForm.body.focus()

or focus to any other field on the form.
0
 
thirdCommented:
another way is to blur from you field

theForm.body.blur()

but of course blurring will lose focus to your textarea.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now