I am trying to use jQuery. To update a specific TD with innerHTML I am trying to figure out, how I can catch the value of the parameter.
In this example i need to catch the user-id "1234" so i can update the TD with the ID "status1234".
I am not very familar with javascript, I hope someone can give me a hint.
$(function() {
$('.ajax-link').click(function() {
$.get($(this).attr('href'), function(msg) {
alert("Data Saved: " + msg);
$("#status" & user).html("some content");
});
return false;
});
});
// TD with Link:
<td id="status1234">
<a href="/ajax_test.cfm?user=1234" class="ajax-link">Do the Ajax</a>
</td>
Thanx!
$("#status" & user)supposed to mean?&is bit-wise AND, why would you use it with strings? To concatenate strings you use+.