Finding selected table row id using javascript

Dear all,

I want to find the selected row id from a jsp file using javascript.

<script>

function getSelectedRowId() {

var row = document.getElementById "form1:table1:tableRowGroup1");

row.?

}

</script>

If anyone can help me filling up the above question mark.

Thanks in advance.

[355 byte] By [Riadula] at [2007-11-15]
# 1
What do you want to achieve?
BalusCa at 2007-7-12 > top of java,Enterprise & Remote Computing,Web Tier APIs...
# 2
function getSelectedRowId(row) {var rowNum= row.parentNode.parentNode.rowIndexalert(rowNum)}and while calling it ,put getSelectedRowId(this)
chitra_Ja at 2007-7-12 > top of java,Enterprise & Remote Computing,Web Tier APIs...
# 3
Thanks a lot chitra_J. It works fine and I really appreciate your help. Do you know where can I get the documentation on javascript functions for visual web pack. Thanks again.
Riadula at 2007-7-12 > top of java,Enterprise & Remote Computing,Web Tier APIs...
# 4
Javascript is an independent scripting language which can be used anywhere. It has actually nothing to do with Java.You can find a nice tutorial at w3schools: http://www.w3schools.com/js/default.asp
BalusCa at 2007-7-12 > top of java,Enterprise & Remote Computing,Web Tier APIs...
# 5

Specifically, I would like to see the doc on Javascript functions that are used in woodstock (VWP). For example: javascript functions that are developed (in Sun's RI of JSF) to manipulate the Table, TableRowGroup and etc.

Thanks for explaing what is javascript.

Message was edited by:

Riadul

Riadula at 2007-7-12 > top of java,Enterprise & Remote Computing,Web Tier APIs...