I have a small question. I have an input field where somebody can search a specific value. Here is the following code
$('#usersearch').keyup(function () {
var inputvalue = $('#usersearch').val();
$('#usersearch').val(inputvalue);
document.getElementById("popupwithuserssearch").style.display = "block";
$.ajax({
type: "GET",
url: "usersearch.php",
data: {
input: inputvalue
},
success: function(msg) {
$('#popupwithuserssearch').html(msg);
}
});
})
After i run my query in usersearch.php I echo the html to generate a table :
$cell='1';
while (!$rs->EOF){
echo '<tr>';
echo '<td align="left" class="cell-'.$cell.'" bgcolor="#F0F0F0"><a href="#" style="color:black;" id="clicked">'.$rs->fields('name').'</a></td><br>';
$cell = $cell+1;
$rs->movenext();
echo ' </tr>';
} ';
now i'm trying to get the value if the a href is clicked i tried this already:
$("#clicked").click(function () {
var value = $(".testClick").attr("href");
alert(value );
});
I'm probably looking over it can somebody help me out
Thanks!