SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Guru adammc's Avatar
    Join Date
    Aug 2004
    Location
    Cairns, Australia
    Posts
    762
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Textarea - non editable

    Hi guys,

    Is there a way to make a textarea not editable?

    PHP Code:
    <textarea cols="80" name="message" rows="12" style="font-size:11px;padding:5px;">
    default 
    text goes here and here
    </textarea
    I want to display the above as a textarea and be able to post the data but I dont want the user to be able to edit it.

  2. #2
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,621
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Try the readonly attribute. Google for more information.
    Do you have an account at DS? I think I know your avatar.

    Ah nevermind, you can have focus on the readonly attriute.

    Read this from Microsoft
    Always looking for web design/development work.
    Willing to do it cheap to build portfolio!

  3. #3
    SitePoint Guru adammc's Avatar
    Join Date
    Aug 2004
    Location
    Cairns, Australia
    Posts
    762
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi thanks for the reply

    Do you have an account at DS?
    What is 'DS'?

  4. #4
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,621
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    DevShed.

    Did my reply suffice a good answer for your question (God that was worded weird)
    Always looking for web design/development work.
    Willing to do it cheap to build portfolio!

  5. #5
    SitePoint Guru adammc's Avatar
    Join Date
    Aug 2004
    Location
    Cairns, Australia
    Posts
    762
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes, Im a member of devshed

    To be honest, you lost me with your advice, it went a little over my head lol

  6. #6
    SitePoint Wizard Blake Tallos's Avatar
    Join Date
    Jun 2008
    Location
    Cuyahoga Falls, Ohio.
    Posts
    1,510
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code HTML4Strict:
     
     
    <form name=myform>
    <textarea name=mytextarea cols=5 rows=5 readonly>
    This is a non editable  text area for Adammc
    </form>

    Adammc What browser are you trying to use this non editable text area for? Although there is alot of arguments on not using readonly="readonly" attribute.
    This is pretty intresting actually i had to look it up and do some research.


    http://saloon.javaranch.com/cgi-bin/...&f=20&t=002098

    http://www.hscripts.com/tutorials/ht...m-textarea.php

    http://www.oracle.com/technology/tec...WebWidget.html

    If anyone else has any suggestions on how to do this feel free to post.

    Blake Tallos - Software Engineer for Sanctuary
    Software Studio, Inc. C# - Fanatic!
    http://www.sancsoft.com/


  7. #7
    SitePoint Guru adammc's Avatar
    Join Date
    Aug 2004
    Location
    Cairns, Australia
    Posts
    762
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    AWESOME!!
    Thank you it works in both IE and Firefox

  8. #8
    SitePoint Wizard Blake Tallos's Avatar
    Join Date
    Jun 2008
    Location
    Cuyahoga Falls, Ohio.
    Posts
    1,510
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sweet I didnt try it out. But now i know that it works. Im glad to help you Out if you have any more problems make sure you come back.
    Blake Tallos - Software Engineer for Sanctuary
    Software Studio, Inc. C# - Fanatic!
    http://www.sancsoft.com/


  9. #9
    SitePoint Guru adammc's Avatar
    Join Date
    Aug 2004
    Location
    Cairns, Australia
    Posts
    762
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks again

  10. #10
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In xhtml:
    readonly="readonly"

  11. #11
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,621
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    You could merely have read the link I gave, yet there was no example there I think so thank the others for providing one. Glad it worked .

    I'm GameYin at DS.
    aka Groundscape
    Always looking for web design/development work.
    Willing to do it cheap to build portfolio!


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
  •