Prev: FAQ Topic - How do I check to see if a child window is open, before opening another? (2010-04-20)
Next: FAQ Topic - How do I format a Number as a String with exactly 2 decimal places? (2010-03-30)
From: Scott Sauyet on 21 Apr 2010 09:23 Thomas 'PointedEars' Lahn wrote: > Garrett Smith wrote: >> Thomas 'PointedEars' Lahn wrote: >>> Garrett Smith wrote: >>>> Eric Bednarz wrote: >>>>> Garrett Smith <dhtmlkitc...(a)gmail.com> writes: >>>>>>> Are you sure you want to use XHTML? >>>>>> Probably not; that small sample contains XHTML errors. >>>>> Please dont feel shy about being specific. >>>> Don't be scared to run the code through the w3c html validator and find >>>> them for yourself. > >>> You don't know what you are talking about. It's a fragment of Valid >>> XHTML 1.0 Transitional. > >> That is an assumption. It could very well be XHTML strict for all you >> know. > > I have written it to be XHTML 1.0 Transitional, stupid. Thomas, you do realize that Garrett was almost certainly NOT referring to your sample but to the OP's code when he responded to your |> Are you sure you want to use XHTML? with | Probably not; that small sample contains XHTML errors. don't you? Why should your suggested replacement code have anything to do with his response? Perhaps at other times Garrett has earned the insult, but not this time. I think here it's your confusion at issue. -- Scott
From: Thomas 'PointedEars' Lahn on 21 Apr 2010 09:40 Scott Sauyet wrote: > Thomas 'PointedEars' Lahn wrote: >> Garrett Smith wrote: >>> Thomas 'PointedEars' Lahn wrote: >>>> Garrett Smith wrote: >>>>> Eric Bednarz wrote: >>>>>> Garrett Smith <dhtmlkitc...(a)gmail.com> writes: >>>>>>>> Are you sure you want to use XHTML? >>>>>>> Probably not; that small sample contains XHTML errors. >>>>>> Please don't feel shy about being specific. >>>>> Don't be scared to run the code through the w3c html validator and >>>>> find them for yourself. >>>> You don't know what you are talking about. It's a fragment of Valid >>>> XHTML 1.0 Transitional. >>> That is an assumption. It could very well be XHTML strict for all you >>> know. >> I have written it to be XHTML 1.0 Transitional, stupid. > > Thomas, you do realize that Garrett was almost certainly NOT referring > to your sample but to the OP's code when he responded to your > > |> Are you sure you want to use XHTML? > > with > > | Probably not; that small sample contains XHTML errors. > > don't you? Why should your suggested replacement code have anything > to do with his response? > > Perhaps at other times Garrett has earned the insult, but not this > time. I think here it's your confusion at issue. I think I am not privileged to confusion: ,-<news:hqlsv7$keb$1(a)news.eternal-september.org> | | That is an assumption. It could very well be XHTML strict for all you | know. How can it be "XHTML strict" when it would not even qualify as XHTML 1.0 Transitional? ISTM Garrett needs to make up his mind about his assumptions, or stop making them. PointedEars -- Prototype.js was written by people who don't know javascript for people who don't know javascript. People who don't know javascript are not the best source of advice on designing systems that use javascript. -- Richard Cornford, cljs, <f806at$ail$1$8300dec7(a)news.demon.co.uk>
From: Scott Sauyet on 21 Apr 2010 10:04 Thomas 'PointedEars' Lahn wrote: > Scott Sauyet wrote: >> Thomas 'PointedEars' Lahn wrote: >>> Garrett Smith wrote: >>>> Thomas 'PointedEars' Lahn wrote: >>>>> Garrett Smith wrote: >>>>>> Eric Bednarz wrote: >>>>>>> Garrett Smith <dhtmlkitc...(a)gmail.com> writes: >>>>>>>>> Are you sure you want to use XHTML? >>>>>>>> Probably not; that small sample contains XHTML errors. >>>>>>> Please dont feel shy about being specific. >>>>>> Don't be scared to run the code through the w3c html validator and >>>>>> find them for yourself. >>>>> You don't know what you are talking about. It's a fragment of Valid >>>>> XHTML 1.0 Transitional. >>>> That is an assumption. It could very well be XHTML strict for all you >>>> know. >>> I have written it to be XHTML 1.0 Transitional, stupid. > >> Thomas, you do realize that Garrett was almost certainly NOT referring >> to your sample but to the OP's code when he responded to your > >> |> Are you sure you want to use XHTML? > >> with > >> | Probably not; that small sample contains XHTML errors. > >> don't you? Why should your suggested replacement code have anything >> to do with his response? > > > Perhaps at other times Garrett has earned the insult, but not this > > time. I think here it's your confusion at issue. > > I think I am not privileged to confusion: > > ,-<news:hqlsv7$keb$1(a)news.eternal-september.org> > | > | That is an assumption. It could very well be XHTML strict for all you > | know. > > How can it be "XHTML strict" when it would not even qualify as XHTML 1.0 > Transitional? ISTM Garrett needs to make up his mind about his assumptions, > or stop making them. I think it was your assumption that the OP was using an XHTML doctype that started the confusion and then your misunderstanding of Garrett's objection that extended it. You were the only one talking about your proposed alternative code; everyone else, as I understand it, was talking about the OP's code. Can you justify your assumption that the OP was trying to use XHTML? The fragment supplied would not be valid in either HTML 4.01 or XHTML 1.0 documents, but if the form controls were wrapped in a block element, then it would be a valid fragment of an HTML 4.01 document but not of a an XHTML one. -- Scott
From: Thomas 'PointedEars' Lahn on 21 Apr 2010 11:38 Scott Sauyet wrote: > Thomas 'PointedEars' Lahn wrote: >> Scott Sauyet wrote: >>> Thomas 'PointedEars' Lahn wrote: >>>> Garrett Smith wrote: >>>>> Thomas 'PointedEars' Lahn wrote: >>>>>> Garrett Smith wrote: >>>>>>> Eric Bednarz wrote: >>>>>>>> Garrett Smith <dhtmlkitc...(a)gmail.com> writes: >>>>>>>>>> Are you sure you want to use XHTML? >>>>>>>>> Probably not; that small sample contains XHTML errors. >>>>>>>> Please don't feel shy about being specific. >>>>>>> Don't be scared to run the code through the w3c html validator and >>>>>>> find them for yourself. >>>>>> You don't know what you are talking about. It's a fragment of Valid >>>>>> XHTML 1.0 Transitional. >>>>> That is an assumption. It could very well be XHTML strict for all you >>>>> know. >>>> I have written it to be XHTML 1.0 Transitional, stupid. >>> >>> Thomas, you do realize that Garrett was almost certainly NOT referring >>> to your sample but to the OP's code when he responded to your >>> >>> |> Are you sure you want to use XHTML? >>> >>> with >>> >>> | Probably not; that small sample contains XHTML errors. >>> >>> don't you? Why should your suggested replacement code have anything >>> to do with his response? >>> >>> Perhaps at other times Garrett has earned the insult, but not this >>> time. I think here it's your confusion at issue. >> >> I think I am not privileged to confusion: >> >> ,-<news:hqlsv7$keb$1(a)news.eternal-september.org> >> | >> | That is an assumption. It could very well be XHTML strict for all you >> | know. >> >> How can it be "XHTML strict" when it would not even qualify as XHTML 1.0 >> Transitional? ISTM Garrett needs to make up his mind about his >> assumptions, or stop making them. > > I think it was your assumption that the OP was using an XHTML doctype > that started the confusion and then your misunderstanding of Garrett's > objection that extended it. On which parts the misunderstandings were, remains to be seen. > You were the only one talking about your proposed alternative code; > everyone else, as I understand it, was talking about the OP's code. Check again. > Can you justify your assumption that the OP was trying to use XHTML? Yes. > The fragment supplied would not be valid in either HTML 4.01 or XHTML > 1.0 documents Wrong, see below. > but if the form controls were wrapped in a block element, then it would be > a valid fragment of an HTML 4.01 document but not of a an XHTML one. True. The problem here is that the original code -- <form onsubmit="return false;" action="[action]" method="post"> <textarea name="myText" cols="30" rows="3"></textarea> <input type="button" name="button" value="Value2" onClick="this.form.submit();"/> <input type="button" name="button" value="Value2" onClick="this.form.submit();"/> </form> -- does not make a lot of sense to begin with, so all of us are left with assumptions what it is supposed to be. One assumption, from which, if accepted, could be deduced anything, which would not result in a fruitful discussion, should therefore be excluded from the start: That the OP just made an accidental typo, or used completely different code. We must therefore also exclude that "[action]" was anything else than a marked omission. Given those premises that leaves the following valid alternative assumptions: A) The `onClick' indicates that this is supposed to be HTML. In that case, it can be Valid HTML 4.01 Transitional, although the output might not look as expected (if there was a user agent that parsed it strictly, there would be `>' displayed). It could be made HTML 4.01 Transitional. B) The `/>' indicates that this is supposed to be XHTML. Then it could be Valid XHTML 1.0 Transitional were it not for "onClick" instead of "onclick". It could be made XHTML 1.0 Strict with more changes. Facing these alternatives, I have applied that scientific principle known as Occam's Razor, which says in essence that the simplest explanation is usually the correct one. The Levenshtein distance of the original fragment to a Valid HTML 4.01 Transitional fragment is 0, to a Valid HTML 4.01 Strict fragment -- <form onsubmit="return false;" action="[action]" method="post"> <p><textarea name="myText" cols="30" rows="3"></textarea> <input type="button" name="button" value="Value2" onClick="this.form.submit();"/> <input type="button" name="button" value="Value2" onClick="this.form.submit();"/> </form> -- it is greater than or equal to 3, to a Valid XHTML 1.0 Transitional fragment -- <form onsubmit="return false;" action="[action]" method="post"> <textarea name="myText" cols="30" rows="3"></textarea> <input type="button" name="button" value="Value2" onclick="this.form.submit();"/> <input type="button" name="button" value="Value2" onclick="this.form.submit();"/> </form> -- it is 2, and to a Valid XHTML 1.0 Strict fragment -- <form onsubmit="return false;" action="[action]" method="post"> <p><textarea name="myText" cols="30" rows="3"></textarea> <input type="button" name="button" value="Value2" onclick="this.form.submit();"/> <input type="button" name="button" value="Value2" onclick="this.form.submit();"/></p> </form> -- it is greater than or equal to 9. Considering interoperability in addition to validity, HTML 4.01 Transitional would score at least 2, while HTML 4.01 Strict would score at least 9. (The *lowest* score wins here.) That leaves HTML 4.01 Transitional (0 or 2) and XHTML 1.0 Transitional (2) as the most likely candidates. Assuming that a newcomer writing such code would have at least heard about XHTML, given the number of occurrences in the past where newcomers posted (often invalid) markup with SHORTTAG syntax that turned out to be supposed to be XHTML, and that the OP used `onsubmit' where it could have been, for consistency, `onSubmit' in HTML, I decided that it would be best if I posted my suggestion as an XHTML 1.0 Transitional fragment. In any case, Garrett's assumption that this might be XHTML 1.0 Strict is, given these numbers, less likely than all the alternatives except interoperable Valid HTML 4.01 Strict. And his criticism of my XHTML 1.0 Transitional suggestion is inconsistent with his assumption (in the very same posting!) that the OP did not want to use XHTML at all. BTW, Garrett's assumption that Eric changed the code was unjustified, too. Eric merely quoted my suggestion as quoted by Garrett before, but he removed the relevant attribution lines. So much for confusion. EOD? PointedEars -- Danny Goodman's books are out of date and teach practices that are positively harmful for cross-browser scripting. -- Richard Cornford, cljs, <cife6q$253$1$8300dec7(a)news.demon.co.uk> (2004)
From: Thomas 'PointedEars' Lahn on 21 Apr 2010 11:49
Thomas 'PointedEars' Lahn wrote: > [...] > Given those premises that leaves the following valid alternative > assumptions: > > A) The `onClick' indicates that this is supposed to be HTML. In that > case, it can be Valid HTML 4.01 Transitional, although the output > might not look as expected (if there was a user agent that parsed > it strictly, there would be `>' displayed). It could be made HTML > 4.01 Transitional. ^^^^^^^^^^^^ _Strict_ PointedEars |