SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
-
Jul 27, 2007, 19:17 #1
- Join Date
- Dec 2005
- Posts
- 38
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Keeping users from messing up entry
I have this cool textbox which you can test here: http://www.freewebs.com/moreauctions/addtext.html
As you can see it adds a linebreak after each text is added. It is meant to creat a list to be output from a form. But a user can click inside the textarea end mess up the list and enter anyway they want.
How can I make sure that there is always a linebreak between each line of text?
Code:<input size="20" id="inputtext"> <input name="add" value="Add" onclick="document.getElementById('textarea').value+='•'+inputtext.value+'\n\n';" type="button"> <textarea rows="15" id="textarea" name="box" cols="22"></textarea>
Last edited by Site Owner; Jul 27, 2007 at 20:04.
-
Jul 28, 2007, 11:55 #2
- Join Date
- Apr 2006
- Posts
- 802
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'd use a group of text input boxes, one for each new list item.
Bookmarks