467,116 Members | 1,271 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

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

textarea problems

say i have a form where, if a user clicks in it, all the text is
highlighted, and where, if a user clicks on a button outside of the
form, a certain text string is inserted where the cursor in the
textarea is. why is it, then, that when i, immediatly after loading
the page, click in the textarea, highlighting the text, click again in
the middle of the text (effectively unhighlighting everything, as
well), and then click on the button to insert to the text, the text
string that is to be inserted appears outside of the form?

here's a working demonstration:

http://www.geocities.com/terra1024/error-forms.html

if you click right before the first and only capatilized T twice, and
then click on the ### link underneath the text area, ### is not
inserted into the form, as i would like, but is rather inserted
outside of the form.

if i comment out the function that is responsible for the
highlighting, it works just fine, although i can't see, for the life
of me, what in the highlighting function is causing this...

any help would be appreciated - thanks! :)
Jul 20 '05 #1
  • viewed: 2105
Share:
1 Reply
yawnmoth wrote:
say i have a form where, if a user clicks in it, all the text is
highlighted, and where, if a user clicks on a button outside of the
form, a certain text string is inserted where the cursor in the
textarea is.
This sounds like javascript, and thus off topic for this group.
here's a working demonstration:

http://www.geocities.com/terra1024/error-forms.html
As I guessed, this is a javascript question.
any help would be appreciated


Ask in a javascript group (after checking their faq, etc.).

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Matt | last post: by
9 posts views Thread by Hal Halloway | last post: by
4 posts views Thread by Chris Sharman | last post: by
5 posts views Thread by Jesper Rønn-Jensen | last post: by
16 posts views Thread by Martin Trautmann | last post: by
2 posts views Thread by Ady | last post: by
4 posts views Thread by TJS | last post: by
5 posts views Thread by bwucke@gmail.com | last post: by
4 posts views Thread by Werner | last post: by
2 posts views Thread by dennis.sprengers@gmail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.