Results 1 to 2 of 2

Thread: textarea grammar

  1. #1
    Join Date
    Feb 2008
    Posts
    81
    Thanks
    8
    Thanked 5 Times in 5 Posts

    Question textarea grammar

    hi,


    I want a script which can automatically change color of the text in a textarea
    for example if the user enters hello it should automatically change to green
    like it happens on code editors.

    can any body help!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    A textarea is not a code editor. If you want about as many features as possible like that use:

    http://www.dynamicdrive.com/dynamici...itor/index.htm

    or a script like it. If you just want to know how to change the color of a textarea using javascript:

    Code:
    <body>
    <textarea id="test" cols="50" rows="5" wrap="virtual""></textarea>
    <script type="text/javascript">
    document.getElementById('test').style.color='green';
    </script>
    </body>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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