Server side processing with client side interaction

Server side processing with client side interaction

tpepernictpepernic Posts: 12Questions: 0Answers: 0
edited August 2013 in General
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.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Agreed - that does rather look like it should work. Can you link us to the page so we can see what is going wrong please?

    Allan
  • tpepernictpepernic Posts: 12Questions: 0Answers: 0
    Thanks for the verification. I didn't think there was anything wrong with the approach. I found the problem. I wasn't properly defining the click event for each row.
This discussion has been closed.