Custom attributes in netscape

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chris Leffer

    #1

    Custom attributes in netscape

    Hi.

    I have a function that needs to read the value of a custom attribute I
    have in some controls. In IE, the code below works ok, in Netscape it
    returns 'undefined' :

    if (elem[i].Valid == 'True')

    How can I read the value of the custom attribute called Valid in both IE
    and Netscape?

    Thanks,

    Chris Leffer




    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
  • Martin Honnen

    #2
    Re: Custom attributes in netscape



    Chris Leffer wrote:[color=blue]
    > Hi.
    >
    > I have a function that needs to read the value of a custom attribute I
    > have in some controls. In IE, the code below works ok, in Netscape it
    > returns 'undefined' :
    >
    > if (elem[i].Valid == 'True')
    >
    > How can I read the value of the custom attribute called Valid in both IE
    > and Netscape?
    >[/color]

    if you have
    <tag id="elementId"
    attribute="valu e"
    then with Netscape 6+ you can read
    document.getEle mentById('eleme ntId').getAttri bute('attribute ')



    --

    Martin Honnen
    http://JavaScript.FAQTs.com/

    Comment

    Working...