Jump to content

How to I get a person to click into my text field at the start of the field?


migroo
 Share

Recommended Posts

I have a text field that looks like this:<textarea name="t1" rows="20" cols="40"></textarea>It works just fine but when you click on it, if you don't click in the exact upper left hand corner, like in the middle it starts you out about 30 spaces into the text area. This isn't a big deal but it is annoying that a little thing like this can be so hard to fix.Any one know how to fix it?Thanks

Link to comment
Share on other sites

Maybe its the line break between the start and end tag? Are you pre-populating the textarea with anything? Anything you put between those 2 tags will appear in the textarea by default.Do you have a link to where this is happening?

Link to comment
Share on other sites

I have several places this happens here is one:My Calendar EditorI don't have any text that goes into the field they are blank.I tried it like this:<textarea name="t1" rows="20" cols="40"></textarea>Nothing in it.The link I posted is for an unfinished editor I can't really post a link to the one I am working on now but they both have the exact same problem.Thanks

Link to comment
Share on other sites

Unlike many elements, a textarea displays all the whitespace between the opening and closing tags. If you want a textarea to start off empty, the tags must look exactly like this: <textarea></textarea> . No line breaks, no tabs.

Edited by Deirdre's Dad
Link to comment
Share on other sites

Awe... There we go.It works now. The problem was I am using frames and for some reason it didn't want to update the page right when I refreshed.So it was still looking at my old code:

		   <textarea name="t1" rows="20" cols="40">		   </textarea>

I see what you are saying it keeps the spaces unlike every thing else.Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...