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

Re: DOM Utility with Firefox

Expand Messages
  • Satyen Desai
    Hi, It s likely that your sDate element has a name= sDate attribute, but does not have an id= sDate attribute. It maybe something like:
    Message 1 of 3 , Apr 30, 2007
    • 0 Attachment
      Hi,

      It's likely that your "sDate" element has a name="sDate" attribute,
      but does not have an id="sDate" attribute.

      It maybe something like:

      <input type="text" name="sDate" value="Apr 30, 2007" />

      Changing it to:

      <input type="text" name="sDate" id="sDate" value="Apr 30, 2007" />

      should fix the issue.

      DOM's get/getXY methods expect the String passed in to refer to the ID
      of the element you're interested in (and not the name).

      The reason that they work in IE with a name is because IE's
      implementation of getElementById, which DOM uses, looks up elements by
      both name and id and is not something which should be relied upon.

      In general, the link below defines and explains YUI's browser support
      in detail:

      http://developer.yahoo.com/yui/articles/gbs/index.html

      Hope that helps,
      Satyen
    • ryan_newsome22
      Hi Satyen, Thank you very much, you were right on!! Thanks, Ryan ... 2007 / ... the ID ... elements by ... support
      Message 2 of 3 , Apr 30, 2007
      • 0 Attachment
        Hi Satyen,

        Thank you very much, you were right on!!

        Thanks,

        Ryan



        --- In ydn-javascript@yahoogroups.com, "Satyen Desai" <sdezzi@...>
        wrote:
        >
        > Hi,
        >
        > It's likely that your "sDate" element has a name="sDate" attribute,
        > but does not have an id="sDate" attribute.
        >
        > It maybe something like:
        >
        > <input type="text" name="sDate" value="Apr 30, 2007" />
        >
        > Changing it to:
        >
        > <input type="text" name="sDate" id="sDate" value="Apr 30,
        2007" />
        >
        > should fix the issue.
        >
        > DOM's get/getXY methods expect the String passed in to refer to
        the ID
        > of the element you're interested in (and not the name).
        >
        > The reason that they work in IE with a name is because IE's
        > implementation of getElementById, which DOM uses, looks up
        elements by
        > both name and id and is not something which should be relied upon.
        >
        > In general, the link below defines and explains YUI's browser
        support
        > in detail:
        >
        > http://developer.yahoo.com/yui/articles/gbs/index.html
        >
        > Hope that helps,
        > Satyen
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.