www.webdeveloper.com
Results 1 to 5 of 5

Thread: Help with Text Areas

  1. #1
    Join Date
    Apr 2008
    Posts
    5

    resolved Help with Text Areas

    How do you respond to text areas

    and also i would liek to know after the user has typed something anything, in the text area and presses submit

    How do u then show the user everythign they typed.

    The reason i want this is so that i want automated pages the user can make

  2. #2
    Join Date
    Jul 2006
    Posts
    60
    Just to clarify, do you mean that you're building a page that displays what the user is writing in the textarea?

    If so, then javascript might be the best option. Perhaps something like the following...

    Code:
    <head>
    <script language="javascript">
    function displayContents(contents)
    {
    document.getElementById('contentsBox').innerHTML=contents;
    }
    </script>
    </head>
    <body>
    <textarea onkeyup="displayContents(this.value)"></textarea>
    <div id="contentsBox"></div>
    </body>
    I haven't tested it, and it could probably be done better, but at least it'll give you a starting point.
    Last edited by sloLearner; 04-21-2008 at 03:08 PM. Reason: error in code

  3. #3
    Join Date
    Aug 2004
    Location
    70 klicks above the Do Lung bridge
    Posts
    654
    PHP is what you would need to use for this. If you want the pages to exist after the user has navigated away from the page, you will need a mysql back end or write the output from the text area to a text file.

  4. #4
    Join Date
    Jul 2006
    Posts
    60
    Ah sorry yes, hadn't read the post properly... getting tired...

  5. #5
    Join Date
    Aug 2004
    Location
    70 klicks above the Do Lung bridge
    Posts
    654
    cloud360, there are loads of tutorials on the web for this topic. Just google "php mysql tutorials" and you'll be spoiled fro choice.
    w3schools and tizag are good for beginners.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles