DataTables with Context Menu
DataTables with Context Menu
touchmenot
Posts: 9Questions: 0Answers: 0
I have integrated a "context menu" to DataTables. All works fine on Safari, Firefox, Chrome and IE8+. But I just tested in IE6 and IE7, the context menu shows up only on the FIRST row of the table I load. One rest of the rows, nothing happens when i click on the cell where the event is tied to.
Here's the context menu I am using with in DataTables.
http://beckelman.net/demos/jQueryListViewWithContextMenu/Default.aspx
Any idea what could be the issue in IE6 or IE7? I am not an expert on javascript. So any advice / guidance is appreciated.
Here's how I have the script for datatables and the context menu.
[code]
$(document).ready(function() {
$("#myContext1Menu DIV").contextMenu({
menu: 'myContext1Menu', anyClick: true
},
function(action, el, pos) {
window.location=action + $(el).attr('id');
});
$("#myContext2Menu DIV").contextMenu({
menu: 'myContext2Menu', anyClick: true
},
function(action, el, pos) {
window.location=action + $(el).attr('id');
});
$('#myTable').dataTable({
"bPaginate": true,
"bLengthChange": true,
"bFilter": true,
"bSort": true,
"bInfo": true,
"bAutoWidth": true,
"sPaginationType": "full_numbers",
"bJQueryUI": true,
"aaSorting": [],
"aoColumnDefs": [
{"bSortable": true,"aTargets": [6] }
]
} );
});
[/code]
Here's the context menu I am using with in DataTables.
http://beckelman.net/demos/jQueryListViewWithContextMenu/Default.aspx
Any idea what could be the issue in IE6 or IE7? I am not an expert on javascript. So any advice / guidance is appreciated.
Here's how I have the script for datatables and the context menu.
[code]
$(document).ready(function() {
$("#myContext1Menu DIV").contextMenu({
menu: 'myContext1Menu', anyClick: true
},
function(action, el, pos) {
window.location=action + $(el).attr('id');
});
$("#myContext2Menu DIV").contextMenu({
menu: 'myContext2Menu', anyClick: true
},
function(action, el, pos) {
window.location=action + $(el).attr('id');
});
$('#myTable').dataTable({
"bPaginate": true,
"bLengthChange": true,
"bFilter": true,
"bSort": true,
"bInfo": true,
"bAutoWidth": true,
"sPaginationType": "full_numbers",
"bJQueryUI": true,
"aaSorting": [],
"aoColumnDefs": [
{"bSortable": true,"aTargets": [6] }
]
} );
});
[/code]
This discussion has been closed.
Replies
So any one interested in adding a Context menu to dataTables, the script / link on the initial post should work with no issues.