Link to home
Create AccountLog in
Avatar of beregoth
beregoth

asked on

Strange TextArea indeed

I hope I am just overlooking something, but I noticed the other day, after having slapped a textarea control on a form on a page, that when the page displays, I can click anywhere in the textarea and the caret cursor will stick to that point and let me start typing.  This is not typical behavior so I am hoping there is just some setting I am overlooking.  You should not be allowed to place the caret anywhere there is no text or only at the very end of any text or inside any text that is available.  That is not what is happening.
Avatar of Nathan Stanford Sr
Nathan Stanford Sr
Flag of United States of America image

hmmmm... I had something simular to this.

Tell me if this is a is a text area with a variable in it?

If so you might need to #trim(varname)#

Nathan
Avatar of beregoth
beregoth

ASKER

I have tried it with content from a database, and while it populates fine, the problem exists before I populate it with anything (as I said, I just wanted to try this out on a test page).
Avatar of meverest
if the textarea element is in a CF script, it may be due to the CF server placing lots of blank padding in between <texarea ...> and </textarea>, thus cause the effect you experience.

view the source of the page from the browser to see what is between those tags.

if there is junk in there (or blanks) maybe write them in your cf script exactly adjacent like <texarea ...></textarea>

cheers.
ASKER CERTIFIED SOLUTION
Avatar of jcummings
jcummings

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Hard decision on the points award.  Everyone had a valid part of the answer.  The ultimately solutions was if you are not putting any text in the text area, make sure to open and close the take with nothing between the two (I had a carriage return and several tabs on the next line of code).

The second part of the answer is that if you are pulling a database field and putting it into the text area, you must use #Trim(fieldname)# to make sure that the cursor cannot be placed anywhere in the text area.

So, nathans, I know you are good as you have helped me more times than I can thank you but you have gotten so many points from the vast array of people you have helped, I am going to award the points to jcummings, even if for no other reason than he simply said here is the answer, rather than just commenting and hoping it was the right answer.

And don't feel left out meverest, you too were on the ball.  When the tables are turn for a question of mine to be answered, you will get the benefit of the doubt next.

But thanks to all who helped, and you all did....and nathans...somehow I am sure we will talk again...so please forgive me and tell me I have not broken your heart :).

Happy development.
Every thing is ok...

Check out my web page
http://www.nsnd.com/

Also Check out my
ColdFusion Tips Plus FREE e-ZINE
http://www.nsnd.com/cftips

or subscribe by sending a blank email to
subscrib-cftips@nsnd.com

Talk Later
Nathan@nsnd.com