object doesn't support this property or method error

Discussion in 'Javascript' started by Drew, Nov 8, 2006.

  1. Drew

    Drew Guest

    content = frames["iAnnoun"].document.getElementById("table").innerHTML;
    tdtags = content.getElementsbyTagName("TD");


    its the line tdtags = content.getElementsbyTagName that causes the
    error. how can i get this to work?
    Drew, Nov 8, 2006
    #1
    1. Advertising

  2. Drew wrote:
    > content = frames["iAnnoun"].document.getElementById("table").innerHTML;


    innerHTML gives you a string.

    > tdtags = content.getElementsbyTagName("TD");


    Strings do not have a method getElementsByTagName, only document nodes
    and element nodes have that.


    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
    Martin Honnen, Nov 8, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Roman
    Replies:
    0
    Views:
    4,018
    Roman
    Jan 4, 2004
  2. mygoogleac
    Replies:
    0
    Views:
    166
    mygoogleac
    Oct 2, 2003
  3. Matt
    Replies:
    3
    Views:
    190
  4. news.onetel.net.uk
    Replies:
    3
    Views:
    203
    Michael Winter
    Aug 9, 2004
  5. SmittyBroham
    Replies:
    2
    Views:
    118
    SmittyBroham
    Jan 7, 2005
Loading...

Share This Page