Access rows of a created table
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Access rows of a created table

From: <scott.loomis@gmail.com>
Date: Mon Mar 20 2006 - 20:53:58 CET

I have a javascript function that catches a click event of a row in a
table, but I am looking for a way to simulate a click in the first row
on page load.

function onRowClick(row)
{
//Do something

}

My table is actually a .Net Datagrid named dgrList, here is the grid

<asp:datagrid id="dgrList" runat="server" Width="448px"
BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px"
BackColor="White" CellPadding="3" GridLines="Horizontal"
autogeneratecolumns="False">

Now when I try to run something like
onRowClick(document.frmRemoteScan.dgrList.rows(0));

I get the message that dgrList is null or not an object, and when I
loop throught the elements in my form, dgrList is not one of them(yes
it is between the form tags).

My question, is there a way to reference the created table via
javascipt? Or does anyone have a way to simulate the row clcik via
javascript
Received on Mon May 1 04:17:04 2006