• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1222
  • 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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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