gecko textarea

M

mbstevens

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?
 
D

David Dorward

mbstevens said:
<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.

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
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).
 
A

Adrienne Boswell

Gazing into my crystal ball I observed mbstevens
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>
 
M

mbstevens

David said:
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.
 
N

Neal

mbstevens:
David:

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.
 
D

David Dorward

mbstevens said:
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".
 
D

David Dorward

"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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top