Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder
    Join Date
    Feb 2003
    Posts
    345
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question wrap="off" not valid XHTML 1.0. What to use?

    Does anybody know what I can use instead of wrap="off" to put some code in a textarea that could be valid XHTML 1.0? Thanks.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,646
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Try:
    nowrap="nowrap"
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #3
    Regular Coder
    Join Date
    Feb 2003
    Posts
    345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry if I didn't answer before. That's not what I need. I just have to write some javascript code in a textarea and I want the text inside to be as long as I need without returns. I think wrap="off" is the only solution but it's not valid.

  • #4
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    Can you show the error you get when you try to validate it? As far as I'm aware wrap="off" is valid

  • #5
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It's not.
    Code:
    <!ELEMENT textarea (#PCDATA)>     <!-- multi-line text field -->
    <!ATTLIST textarea
      %attrs;
      %focus;
      name        CDATA          #IMPLIED
      rows        %Number;       #REQUIRED
      cols        %Number;       #REQUIRED
      disabled    (disabled)     #IMPLIED
      readonly    (readonly)     #IMPLIED
      onselect    %Script;       #IMPLIED
      onchange    %Script;       #IMPLIED
      >
    No wrap in there. For those of you that don't speak DTD, 'wrap' should appear in that list in the lefternmost column if it was an attribute of textarea.

    This is XHTML1.1 though...
    David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
    W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!

  • #6
    Regular Coder
    Join Date
    Feb 2003
    Posts
    345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is what the W3C validator gives for a XHTML 1.0 Trans doc:

    Line 267, column 35: there is no attribute "wrap" (explain...).
    <textarea cols="50" rows="15" wrap="off" readonly="readonly">

    I think there is not a walk-around for it.

  • #7
    Moderator
    Join Date
    May 2002
    Location
    Hayward, CA
    Posts
    1,461
    Thanks
    1
    Thanked 23 Times in 21 Posts
    I'm sorry to say guys that you're right. I bumped into this issue about a year ago, and it's something they changed in the XHTML DTD.

    The really lousy part about it is the CSS specification doesn't have a way around it either, I think. You might try overflow: scroll, but I have little confidence that will work.
    "The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
    June 30, 2001
    author, Verbosio prototype XML Editor
    author, JavaScript Developer's Dictionary
    https://alexvincent.us/blog


  •  

    Posting Permissions

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