How can I get the td values with jquery? The while loops will generate a few with the same class name...
<?php
while(...){
?>
data 0 |
<?php
}
?>
Jquery's:
$(".getValue").click(function(){ $.post("somescript.php", { value:$("data0").val()}, function(data){ alert(data); }); });
UPDATE:
Well, I'm generating a table with data that came's from a database. After that I want to delete any row from the database so, I put a button attached to every data value () the problem here is to get the proper td value once I'm using the same class name on every button and td... after that I will use AJAX and delete the PROPER row of data from database with PHP.
UPDATE:
The generated code will look like this:
xzczxc |
gfh+pso
sdhgfjgk
asdghdas
egfcn
sdfds..k
6ytytu
tyghj0
daghjgh0
dagh0
dada0
dasa
How to delete for example the fourth row? Or the fifth?
I just want to get the td values when press the button and passe those values to the php script that all.
I want to pass some td values to ajax call when pressing the button "Delete"
first column |
first column |
first column |
|
jkhghj |
dsfg |
iouhfg |
hgjdss |
oiuy |
qweasd |
aweda |
asd |
asd |
asdasvg |
esw |
ee |
qw |
zdg |
lykj |
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)