SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Threaded View

  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2005
    0 Post(s)
    0 Thread(s)

    Keeping users from messing up entry

    I have this cool textbox which you can test here:

    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?

    <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>
    I have considered the readonly option but I need users to be able to delete entries.
    Last edited by Site Owner; Jul 27, 2007 at 20:04.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts