Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > gecko textarea

Reply
Thread Tools

gecko textarea

 
 
mbstevens
Guest
Posts: n/a
 
      12-07-2004
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


 
Reply With Quote
 
 
 
 
David Dorward
Guest
Posts: n/a
 
      12-07-2004
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
 
Reply With Quote
 
 
 
 
Adrienne Boswell
Guest
Posts: n/a
 
      12-07-2004
Gazing into my crystal ball I observed mbstevens
<(E-Mail Removed)> writing in
news:Rkdtd.7747$(E-Mail Removed) ink.net:

> 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
 
Reply With Quote
 
mbstevens
Guest
Posts: n/a
 
      12-07-2004
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.



 
Reply With Quote
 
mbstevens
Guest
Posts: n/a
 
      12-07-2004
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.

 
Reply With Quote
 
Neal
Guest
Posts: n/a
 
      12-07-2004
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.
 
Reply With Quote
 
David Dorward
Guest
Posts: n/a
 
      12-07-2004
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
 
Reply With Quote
 
David Dorward
Guest
Posts: n/a
 
      12-07-2004
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add </textarea> within <textarea> tags? frank.moens@gmail.com Javascript 1 07-04-2007 04:00 PM
Textarea Inside of a textarea wperry1@gmail.com ASP General 6 02-05-2006 08:00 AM
possible bug in Gecko 1.8 ? false-name@false-account.net Firefox 1 10-11-2005 04:50 PM
Mulitiline Tooltips working in IE, but not in the Gecko based browsers tshad ASP .Net 1 04-04-2005 06:29 PM
Removing carriage returns from <textarea></textarea> input Augustus ASP General 1 09-10-2003 04:55 AM



Advertisments