Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Stefan Mueller
January 23, 2006, 9:06 am
rate this thread
<table name = "my_table" border = "1">
<input type = "checkbox" onClick = "alert('Row 1');">
<input type = "checkbox" onClick = "alert('Row 2');">
That works fine but I'd like to do it dynamically.
but it doesn't work (Error: document.my_form.my_table has no properties). I
think the problem is that <table> does not have a 'name' attribute.
Does anyone know how I can get the row dynamically?
Re: How to figure out on which row of a table I click e.g. a checkbox
I wrote some Java Scripts to sort a html table.
The data are visible on the screen (html table) and are also stored in an
array. If I click now on a checkbox I need to now which row of my array
'array[row]' I have to modify (modify the flag of the checkbox). That's the
reason I need to know on which row I've clicked the checkbox.