Results 1 to 4 of 4

Thread: [resolved][Javascript] Find datagrid <input> text element values for only one column

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    1,276

    Resolved [resolved][Javascript] Find datagrid <input> text element values for only one column

    I have a datagrid on an asp.net page and I need to find the values in embedded <input> text element controls only for a certain column in order to sum these values.

    This javascript only gets me down to the <td>'s I need and I can't go any further to get to the <input>'s and get the values. Not all cells in this column have embedded <input> elements.

    PHP Code:
    function GetValues()
    {
        
    // get datagrid by rendered table name
        
    var grid document.getElementById('datagrid1');
        var 
    len grid.rows.length;
        
        
    // touch each row, retrieve cell 2 innerHTML
        
    for(0leni++)
        {
            
    // show raw text for cells, <input type="text"... > for text box
            
    alert(grid.rows[i].cells[2].innerHTML);
        }

    How can I get the values of the <input> text elements?
    Last edited by wey97; Sep 26th, 2006 at 07:26 AM.

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