www.webdeveloper.com
Results 1 to 2 of 2

Thread: Retrive the rows from HTML Table

  1. #1
    Join Date
    Jul 2006
    Posts
    80

    Thumbs up Retrive the rows from HTML Table

    Hi All,
    How can I retrive all the rows(values) of a HTML table using Javascript.

    Thanks
    Dana

  2. #2
    Join Date
    Jul 2006
    Posts
    80
    AtLast I tried this one. Which work well
    PHP Code:
    <script language="javascript">
            function 
    checkall()
            {
            
    debugger;
             var 
    tbl=document.getElementById('tblCycle');
             var 
    tblLength=tbl.rows.length;
             for(
    intcount=1;intcount<tblLength;intcount++)
             {
              var 
    tblCells=tbl.rows.item(intcount).cells
              var 
    tblCellCount=tblCells.length;
                for (
    icount=0;icount<tblCellCount;icount++)
                {
                  
    //alert(tblCells.item(icount).outerText);
                  
                
    }
             }
            }      
        
    </script> 

    But I am facing the otherProblem. I have added TextBoxes in my table. But the outText is not printing the value from the textbox. If i use the innerHTML then it just print the attributes. How can Retrive the textbox values ?

    Dana

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles