Getting the value of the cell on dropZone drop event.
Getting the value of the cell on dropZone drop event.
classic12
Posts: 228Questions: 60Answers: 4
Ongoing test here
http://toolfolks.com/surplusAdmin2/
The following code is working as expected. I click a button and populate the dataTable with some jSon data.
I now need to get the value of the cell that the file is dropped into.
So basically repeat the click button event below for the dropped event.Is the on.draw event the correct place to add the code ?
Dropzone.autoDiscover = false;
$('#dtQuotes').on( 'draw.dt', function ()
{
//alert( 'Table redrawn' );
// allows the on click to show which row. Has to be after the dataTable is created.
$('#dtQuotes tbody').on( 'click', 'button', function () {
var data = tableObject.row( $(this).parents('tr') ).data();
alert( "Quote ID = " + data[0] +"' Date created = "+ data[ 2 ] );
} );
$(".uploadServer").dropzone({ url: "dropZone.php" }); // set the column to accept the file.
} );
// stop the drop outside the dropzone
$(document).on(
{
dragover: function() {
return false;
},
drop: function() {
return false;
}
});
Cheers
Steve Warby
This discussion has been closed.