| Author |
get value on click from table using javascript
|
Alex gRin
Greenhorn
Joined: Nov 21, 2009
Posts: 3
|
|
Please help get value on click from table using java script
I have a table generated from mysql query I have a code that highlight the row on the mouse click it the JavaScript but I also want to get the value of the cells from the row that is highlighted I tried doing different stuff but I always get an error value undefined.
Here is my code
in the JavaScript function I not only want to get the row highlighted but I also want to get the values of the cell in a row on mouse click
THANKS IN ADVANCE
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
first ting for a performance boost, you do not want to check for the body each time in the loop. Instead only grab the rows in the body to start with
If you have multiple tbodies, than you can add a loop there.
To get the values of the cells it would just be something like
Eric>
|
 |
Alex gRin
Greenhorn
Joined: Nov 21, 2009
Posts: 3
|
|
Thanks your suggestion worked fine but now I am face with different problem this code works fine
and I am trying to send it to another php/html page the problem is the JavaScript is not running everything else works fine
is there a way to do this
here is my ajax function which is on separate file specifically for calling files using ajax
is there a way to use this ajax to send the php function above with JavaScript working
Thanks in advance
and Thanks for all the support this site is providing while I work on this project
I would really appreciate any help I am new to web programming that may be the reason why I have so many questions.
|
 |
 |
|
|
subject: get value on click from table using javascript
|
|
|