CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2002
    Posts
    1

    how to make tables' content dynamic?

    Hi everybody,

    I write for netscape. I have a simple table like this:

    <table id="table1">
    <tr id="tr1">
    <td id="td11">text1</td>
    <td id="td12">text2</td>
    </tr>
    <tr id="tr2">
    <td id="td21">text3</td>
    <td id="td21">text4</td>
    </tr>
    </table>

    and I want to change the content of the <td> dynamicly. the problem is that I can't access the <td> by the method document.all("tdId") like in IE, also I can't use the innerHTML to change the content cause those two don't exist for netscape, do u have any idea?

  2. #2
    Join Date
    May 1999
    Location
    New Jersey, USA
    Posts
    369

    Possible solution...

    Did you try Did you try innerText ? If that does not work, try embeddng a <div> or <span> in the <td>here</td> i.e. <td><span name="td1">text to be changed</span></td>. You can use innerText to change the span inner text value.

    btw, you may have better luck using name= instead of id= - I have had problems using id= with netscape.

    good luck

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured