Jump to content

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


migroo

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.

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...