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

Re: [ydn-javascript] How to find available properties and methods?

Expand Messages
  • Satyam
    getAttribute is a method available on most HTML elements. It is not JavaScript nor YUI. See: http://msdn.microsoft.com/en-us/library/ms536429(VS.85).aspx
    Message 1 of 3 , Sep 3, 2008
    • 0 Attachment
      getAttribute is a method available on most HTML elements. It is not
      JavaScript nor YUI. See:

      http://msdn.microsoft.com/en-us/library/ms536429(VS.85).aspx

      Since JavaScript variables can hold all sorts of objects, HTML elements
      and simple variables, and you cannot declare the type of it, many smart
      IDEs fail to show what can be done with each since they can't figure it
      out until execution time. Debuggers are much better at it since they
      can find out what is it that they have stored.

      Satyam


      dave_doms wrote:
      > Hi,
      >
      > Still learning here. I wanted to find an attribute on a selected DOM
      > element but didn't see anything in the DOM docs that could do that.
      > My editor (VS2008) didn't show anything in intellisense so I didn't
      > think I had anything available until I just tried to type
      > .getAttribute and run it in the logger and found that it worked.
      >
      > for (...){
      > YAHOO.log(navLIs[i].getAttribute("class"), "info");
      > }
      >
      > My question is, how would I have found this otherwise? Is this just a
      > JS method for an object like a property such as .length? Can't help
      > but wonder what else I'm missing.
      >
      >
      >
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >
      >
      >
      > ------------------------------------------------------------------------
      >
      >
      > No virus found in this incoming message.
      > Checked by AVG - http://www.avg.com
      > Version: 8.0.169 / Virus Database: 270.6.14/1647 - Release Date: 02/09/2008 6:02
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.