Server side processing with client side interaction
Server side processing with client side interaction
Using DT 1.9.4 I've switched my original table from the DOM source to server side processing. All is well except on the server side I add a couple of extra things, namely input tags. For example, I've added a checkbox that I process with jQuery to delete the files listed in the table and I've added a hidden field. The hidden field is giving me a problem.
I've got a mysql query that returns an array stored into $result_videos, then I loop through and add a couple of fields to the array.
[code]
foreach ($result_videos as $key => $value)
{
$url = $result_videos[$key][3];
$result_videos[$key][4] = "";
//add delete checkbox
$result_videos[$key][3] = "";
}
[/code]
The JSON looks good. Then I try to add a click event to the hidden field:
[code]
jQuery("#webcam-table").on("click", function(e) {
var theUrl = jQuery("input[name=test444]").val();
//dostuff
});
[/code]
The value of theUrl is always undefined. I'm missing something fundamental here but confused because my checkbox input type works well.
I've got a mysql query that returns an array stored into $result_videos, then I loop through and add a couple of fields to the array.
[code]
foreach ($result_videos as $key => $value)
{
$url = $result_videos[$key][3];
$result_videos[$key][4] = "";
//add delete checkbox
$result_videos[$key][3] = "";
}
[/code]
The JSON looks good. Then I try to add a click event to the hidden field:
[code]
jQuery("#webcam-table").on("click", function(e) {
var theUrl = jQuery("input[name=test444]").val();
//dostuff
});
[/code]
The value of theUrl is always undefined. I'm missing something fundamental here but confused because my checkbox input type works well.
This discussion has been closed.
Replies
Allan