SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast Davve's Avatar
    Join Date
    Jan 2002
    Location
    Norrkoping, SWEDEN
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unchangeable textarea

    I have this <TEXTAREA>, but I don't want the viewer to be able to change anything in it. How do I do this?
    David Andersson Davve
    -MSc in Media Technology and Engineering:
    Working at AdLibris

  2. #2
    Shiver me timbers!! anthony_irl's Avatar
    Join Date
    Aug 1999
    Location
    Dublin, Ireland
    Posts
    495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use the DISABLED property. Although it may not be supported by all browsers.

    <textarea rows=50 cols=20 disabled>
    Anthony - How's tings?

    24 hours in a day, 24 beers in a case. Coincidence? I think not.
    Contact me by: PM Email NEW! Carrier Pigeon

  3. #3
    SitePoint Enthusiast Davve's Avatar
    Join Date
    Jan 2002
    Location
    Norrkoping, SWEDEN
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It worked! Thanks!
    David Andersson Davve
    -MSc in Media Technology and Engineering:
    Working at AdLibris

  4. #4
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The value in a disabled form field will not pass it's value when the form is submitted.

    The textarea has an attribute 'readonly' which would be the best solution.
    <textarea rows=50 cols=20 readonly>

    Also, with 'readonly', you will still be able to tab to the textarea(not so with disabled).

  5. #5
    SitePoint Enthusiast Davve's Avatar
    Join Date
    Jan 2002
    Location
    Norrkoping, SWEDEN
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Even more thanks!
    David Andersson Davve
    -MSc in Media Technology and Engineering:
    Working at AdLibris

  6. #6
    Shiver me timbers!! anthony_irl's Avatar
    Join Date
    Aug 1999
    Location
    Dublin, Ireland
    Posts
    495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by shoop
    The value in a disabled form field will not pass it's value when the form is submitted.

    The textarea has an attribute 'readonly' which would be the best solution.
    <textarea rows=50 cols=20 readonly>

    Also, with 'readonly', you will still be able to tab to the textarea(not so with disabled).
    Forgot to mention that, .

    Cheers.
    Anthony - How's tings?

    24 hours in a day, 24 beers in a case. Coincidence? I think not.
    Contact me by: PM Email NEW! Carrier Pigeon


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
  •