gecko textarea

Discussion in 'HTML' started by mbstevens, Dec 7, 2004.

  1. mbstevens

    mbstevens Guest

    Anyone else ever run across this bit of strangeness
    that appears only in in gecko browsers?

    Even though this validates at the w3.org validator:
    <li>
    <p>Comments:</p>
    <textarea name="guest comments" rows="10" cols="35" />
    </li>
    ....the text area shows garbage from other parts of the page's markup in it.

    But if you mark it up like this (which *also* validates):
    <li>
    <p>Comments:</p>
    <textarea name="guest comments" rows="10" cols="35"></textarea>
    </li>
    ....the text area shows no garbage.
    This happened under both galeon and mozilla. Not in Konqueror.

    Complete source is
    http://www.mbstevens.com/bc.html
    ....near bottom of source page.
    (Code shown appears on one line instead of 4.)

    Is this, in your opinion:
    1) validator error
    2) gecko error
    3) my error
    4) none of the above
    5) all of the above
    6) maybe has something to do with delivering as
    <?xml version="1.0" encoding="UTF-8"?>
    ...which gecko understands, other browsers don't?
    --
    mbstevens
    mbstevens, Dec 7, 2004
    #1
    1. Advertising

  2. mbstevens wrote:

    > <textarea name="guest comments" rows="10" cols="35" />
    > ...the text area shows garbage from other parts of the page's markup in
    > it.


    > <textarea name="guest comments" rows="10" cols="35"></textarea>
    > ...the text area shows no garbage.


    > Complete source is
    > http://www.mbstevens.com/bc.html


    The page is served as text/html, not application/xhtml+xml and is therefore
    processed as tag soup, not XML.

    According to the HTML compatibility guidelines in Appendix C of the XHTML
    spec <http://w3.org/TR/xhtml1/#C_3> you should not use the minimised form
    for elements that can have content but just don't happen to.

    > 6) maybe has something to do with delivering as
    > <?xml version="1.0" encoding="UTF-8"?>
    > ...which gecko understands, other browsers don't?


    Its the content type which determines the way the document is processed, not
    the XML prolog (or lack thereof).

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Dec 7, 2004
    #2
    1. Advertising

  3. Gazing into my crystal ball I observed mbstevens
    <> writing in
    news:Rkdtd.7747$:

    > Anyone else ever run across this bit of strangeness
    > that appears only in in gecko browsers?
    >
    > Even though this validates at the w3.org validator:
    > <textarea name="guest comments" rows="10" cols="35" />
    > ...the text area shows garbage from other parts of the page's markup
    > in it.
    >
    > But if you mark it up like this (which *also* validates):
    > <textarea name="guest comments" rows="10" cols="35"></textarea>
    > ...the text area shows no garbage.
    >
    > Is this, in your opinion:
    > 1) validator error
    > 2) gecko error
    > 3) my error
    > 4) none of the above
    > 5) all of the above
    > 6) maybe has something to do with delivering as
    > <?xml version="1.0" encoding="UTF-8"?>
    > ...which gecko understands, other browsers don't?


    1 & 3. See <http://www.w3.org/TR/html401/interact/forms.html#edef-TEXTAREA>

    Textarea is not an empty element like <input> because its data is between
    the opening and closing tags, eg: <textarea rows="5" cols="20">This is some
    text</textarea>

    --
    Adrienne Boswell
    Please respond to the Group so others can share
    Adrienne Boswell, Dec 7, 2004
    #3
  4. mbstevens

    mbstevens Guest

    David Dorward wrote:

    > mbstevens wrote:
    >
    >> <textarea name="guest comments" rows="10" cols="35" />
    >> ...the text area shows garbage from other parts of the page's markup in
    >> it.

    >
    >> <textarea name="guest comments" rows="10" cols="35"></textarea>
    >> ...the text area shows no garbage.

    >
    >> Complete source is
    >> http://www.mbstevens.com/bc.html

    >
    > The page is served as text/html, not application/xhtml+xml and is
    > therefore processed as tag soup, not XML.


    Yes, makes sense. (I'm in fact in process of changing at least my Perl
    generated pages to deliver application/xhtml+xml to browsers that can
    process it. Wouldn't help here, though; it's a static page. Guess I could
    drop back to transitional, where serving as text/html is a *bit* less of a
    sin, but the page seems to run OK on everything. Even displays right on
    that vile IE thingie that we all have to knowtow to.)
    >
    > According to the HTML compatibility guidelines in Appendix C of the XHTML
    > spec <http://w3.org/TR/xhtml1/#C_3> you should not use the minimised form
    > for elements that can have content but just don't happen to.


    Thanks for the reference.
    mbstevens, Dec 7, 2004
    #4
  5. mbstevens

    mbstevens Guest

    Adrienne Boswell wrote:


    > <http://www.w3.org/TR/html401/interact/forms.html#edef-TEXTAREA>



    From that link...
    "Start tag: required, End tag: required"
    noticed by neither me or the validator. Thanks.
    mbstevens, Dec 7, 2004
    #5
  6. mbstevens

    Neal Guest

    mbstevens:
    > David:
    >> The page is served as text/html, not application/xhtml+xml and is
    >> therefore processed as tag soup, not XML.

    >
    > Yes, makes sense. (I'm in fact in process of changing at least my Perl
    > generated pages to deliver application/xhtml+xml to browsers that can
    > process it. Wouldn't help here, though; it's a static page. Guess I
    > could
    > drop back to transitional, where serving as text/html is a *bit* less of
    > a
    > sin, but the page seems to run OK on everything.


    If it's currently valid XHTML 1.0 Strict, don't change it to XHTML 1.0
    Loose, change it to HTML 4.01 Strict. That way the serving method is
    unquestionably correct.

    I don't see a really good reason to be using XHTML on this page anyhow.
    What benefit will it give you? All you need to do is change the empty
    element tags, edit down the <html xmnls etc...> and other XHTML goodness,
    and slap a 4.01 Strict docky-type on the top. Done in about 90 seconds.
    Set it and forget it.
    Neal, Dec 7, 2004
    #6
  7. mbstevens wrote:

    >> The page is served as text/html, not application/xhtml+xml and is
    >> therefore processed as tag soup, not XML.

    >
    > Yes, makes sense. (I'm in fact in process of changing at least my Perl
    > generated pages to deliver application/xhtml+xml to browsers that can
    > process it. Wouldn't help here, though; it's a static page. Guess I
    > could drop back to transitional, where serving as text/html is a *bit*
    > less of a sin


    No it isn't. Following the HTML compatibility guidelines before claiming
    that XHTML is HTML is "a bit less of a sin".

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Dec 7, 2004
    #7
  8. mbstevens wrote:
    > Adrienne Boswell wrote:
    >> <http://www.w3.org/TR/html401/interact/forms.html#edef-TEXTAREA>


    > "Start tag: required, End tag: required"
    > noticed by neither me or the validator.


    It was noticed by the validator, but under XML rules <foo /> is the same as
    <foo></foo> so the element DID have an end tag. You aren't sending it as
    XML though.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Dec 7, 2004
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tshad
    Replies:
    1
    Views:
    326
    gaidar
    Apr 4, 2005
  2. Nicholas Smith

    khtml or gecko for java

    Nicholas Smith, Aug 19, 2003, in forum: Java
    Replies:
    2
    Views:
    914
    Nicholas Smith
    Aug 20, 2003
  3. Augustus
    Replies:
    1
    Views:
    349
    Ken Schaefer
    Sep 10, 2003
  4. Textarea Inside of a textarea

    , Feb 4, 2006, in forum: ASP General
    Replies:
    6
    Views:
    325
    Anthony Jones
    Feb 5, 2006
  5. Replies:
    1
    Views:
    306
    Bart Van der Donck
    Jul 4, 2007
Loading...

Share This Page