Loading ...
Sorry, an error occurred while loading the content.

Re: [NH] What's So Great About XHTML?

Expand Messages
  • Rijk van Geijtenbeek
    On Sun, 15 Dec 2002 14:45:52 -0000, wilkinsonm ... Scripts using ID should still work in recent browsers, but will fail in Netscape 4 and
    Message 1 of 7 , Dec 15, 2002
    • 0 Attachment
      On Sun, 15 Dec 2002 14:45:52 -0000, wilkinsonm <mikew@...>
      <mikew@...> wrote:

      > I've read that HTML authors should move to XHTML because it requires more
      > consistent coding and is a step toward XML. OK, I thought I'd play along,
      > but I discovered that the "name" attribute is deprecated in favor of
      > "id." Unfortunately, if I use "id" instead of "name," my javascripts
      > don't work.

      Scripts using ID should still work in recent browsers, but will fail in
      Netscape 4 and old IE versions.

      > Documentation at w3.org suggests that I should consider using both "name"
      > and "id," but then I will always get error messages if I validate the
      > code.
      >
      > All of this leads me to my question. "What's so great about XHTML?"

      XHTML is needed if you make use of automated systems like XSLT processors
      on the server. Otherwise there's little gain relative to writing valid HTML
      4.01 Strict, which is basically the same, but with a slightly different
      syntax. Using deprecated elements and attributes (and so the Transitional
      doctype) is only needed if you don't know enough CSS to get the same
      effects, or if you still want to support Netscape 3.

      --
      If you don't like having choices | Rijk van Geijtenbeek
      made for you, you should start |
      making your own. - Neal Stephenson | mailto:rijk@...
    • wilkinsonm <mikew@wtribe.com>
      ... Thanks for the tip! ... OK - that makes sense. Thanks again, Mike Wilkinson
      Message 2 of 7 , Dec 15, 2002
      • 0 Attachment
        >"getElementByID" in conjunction
        > with ID tags will very quickly become your friend.
        >

        Thanks for the tip!


        > Well, the problem is that we are in a poor state now. Browser vendors
        > and authors both have to work to set things right. By coding in valid
        > XHTML, we can do our part, as well as ensuring that our pages will be
        > usable in fashions we can't even imagine at the moment.

        OK - that makes sense.

        Thanks again,

        Mike Wilkinson
      • Jason Waugh
        JW document.getElementByID( input1 ).value My apologies to anybody who read this, it s getElementById (with a lowercase d ). -- Regards, Jason Waugh
        Message 3 of 7 , Dec 15, 2002
        • 0 Attachment
          JW> document.getElementByID("input1").value


          My apologies to anybody who read this, it's getElementById (with a
          lowercase "d").

          --
          Regards,
          Jason Waugh
        Your message has been successfully submitted and would be delivered to recipients shortly.