On Click Event - Not Always working
On Click Event - Not Always working
mikebloise
Posts: 4Questions: 1Answers: 0
Hello,
ColdFusion applictation with SQL Server...
I have the following:" onclick="javascript:return confirm('Are you sure you want to remove this Preventive Action Request from the list?')"><font color="red"><u><font size = '1'>Delete</font></u></font></a>
Some times it works and sometimes it does not.
$(document).ready(function () { $('#sortTableAsp').dataTable ( { "scrollY" : "400px", "scrollCollapse" : true, "paging" : true, "columns" : [null,null,null,null,null,null,null,null,null,null,null,{ "searchable": false, "orderable": false }], "stateSave" : true, "stateDuration" : -1, "pageLength" : 25, "order" : [ 6, 'desc' ] } ); });Any help would be appreciated...
Thx,
Mike
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You haven't provided enough information to help.
When does it work and when does it not?
Where is the item you are clicking?
Without knowing more I'm just guessing this might be the problem:
https://datatables.net/faqs/index#events
The best option to get help is to provide a link to your page or a test case replicating the issue.
https://datatables.net/faqs/index#Most-common-FAQs
Kevin
Hi Kevin;
Thanks for the response. Basically I am asking the user if they would like to delete the row in table via onclick.
onclick="javascript:return
Unfortunately I cannot post the link to the code; because of password protected. The problem is intermittent. It seems to happen more often when I added the following:
dom and buttons options; I took this out and the problems seems not to happening as frequent.
$(document).ready(function () { $('#sortTableAsp').dataTable ( { "scrollY" : "400px", "scrollCollapse" : true, "dom" : 'Bfrtip', "buttons" : [{extend: 'excel', text: 'Excel',title: 'Preventive Actions', exportOptions: {columns: [ 0,1,2,3,4,5,6,7,8,9,10]}}, {extend: 'print', text: 'Print',title: 'Preventive Actions',exportOptions: {columns: [ 0,1,2,3,4,5,6,7,8,9,10]}}, {extend: 'pdfHtml5', orientation: 'landscape', pageSize: 'LEGAL', text: 'PDF' ,title: 'Preventive Actions', exportOptions: {columns: [ 0,1,2,3,4,5,6,7,8,9,10]}}] , "paging" : true, "columns" : [null,null,null,null,null,null,null,null,null,null,null,{ "searchable": false, "orderable": false }], "stateSave" :false, "stateDuration" : -1, "pageLength" : 25, "order" : [ 6, 'desc' ] } ); });Without seeing the problem we would be guessing. The button (I'm guessing) you are clicking is not specific to Datatables which means we need to see more than just the Datatables config. Can you provide a working test case that we can look at?
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
It doesn't sound like the problem is due to your specific data so a generic representation should work. We just need to see what you are clicking on to have an idea of how to hep.
Is the button in each table row or somewhere else on the page?
Does it work on the first page but not on the second?
https://datatables.net/faqs/index#events
Kevin
Hi Kevin,
It is really hit/miss. Right now it appears to be working in my laptop and home computer on a different browser for all pages. So I am going to put this to rest for the time being.
Thanks, Mike
Hi All,
Just a followup - I found the solution I was linking to an older PDFMAKE file.
I was at 0.1.53:
Mike