Menu

How to access tables in javascript function

Anonymous
2003-03-07
2003-03-16
  • Anonymous

    Anonymous - 2003-03-07

    Hi,

      I have following javascript function which works fine under Internet Explorer 6.0.

      function ClearTable()
      {
        str  = window.Tbl.rows.length-1
        str1 = window.TblYield.rows.length-1
        for(k = str1; k > 2; k--)
          window.TblYield.deleteRow(k)
      }

      However, HTTPUnit raises JavaScriptException for Tbl, reporting 

      TypeError: "Tbl" is not defined

      Am I missing something?. I would really appreciate somebody's help on this.

      Also if somebody can help similar undefined problem with href that would be great too.

      thanks in advance!

    Laxman

     
    • Russell Gold

      Russell Gold - 2003-03-13

      HttpUnit does not support 100% of the DOM, and provides no support at all for IE proprietary features. If this is a standard feature, please submit an RFE

       
    • Anonymous

      Anonymous - 2003-03-14

      Basically, I have to delete/add rows to the table based on certain events.  I would be great if you could suggest any other way to do this.

      thanks,

      Laxman

       
      • Russell Gold

        Russell Gold - 2003-03-16

        That comes under the general heading of being able to modify the HTML in arbitrary ways. I see that the functions you want are part of the HTML DOM level 2 recommendations, so I will want to implement them eventually - it is just a question of how and when. And I cannot promise anything in the short term.

         

Log in to post a comment.

Auth0 Logo