Hello. I am pretty new to Javascript trying to work on this application for my job. The page contains a dynatable with pagination. I added a 'click' function in my JSP file that does disables some fields when the user clicks to a new page.
$(document).on('click', '.dynatable-page-link', function()
{
var statusCheck = $('#UpdCMDStatus').val();
alert ("Enter the function on dynatable page link") ;
if (statusCheck === "CP" || statusCheck === "VP")
{
$('table#checkedTable input[type=checkbox]').attr("disabled", true);
$('table#checkedTable input[type=text]').attr("disabled", true)
$('table#checkedTable select[id^=Modify]').attr("disabled", true);
}
else
{
$('table#checkedTable input[type=checkbox]').removeAttr("disabled");
}
});
The function is working fine but the processing is occurring before the call of our dynatable.js file (at least it seems) and it wipes out everything. I am trying to figure out where to put this so that it occurs after dynatable processing. I was thinking I can include something in the 'dynatable:afterProcess' event and I saw something involving a .bind statement. But I am confused about how to use it
Is bind method something that appends a task/function to an event or replaces it?
Does the bind statement tied to a function have to be included in the dynatable.js file or can it be included in a JSP file after the dynatable() call?
Hello. I am pretty new to Javascript trying to work on this application for my job. The page contains a dynatable with pagination. I added a 'click' function in my JSP file that does disables some fields when the user clicks to a new page.
The function is working fine but the processing is occurring before the call of our dynatable.js file (at least it seems) and it wipes out everything. I am trying to figure out where to put this so that it occurs after dynatable processing. I was thinking I can include something in the 'dynatable:afterProcess' event and I saw something involving a .bind statement. But I am confused about how to use it
Thanks