thanks for that, but it doesnt seem to work. I am trying to actually pass that variable/array into a jquery ajax function in the data parameter (See code below).
I have also tried to get the form data with $().serialize(); but not luck passing it into the ajax data parameter.. any more ideas??
PHP Code:
$(function() {
//var data_id= new Array;
var data_id= $('.sel_emp').serialize()
$('#delete').click(function() {
$("#doubletrouble").dialog({
closeOnEscape: false,
draggable: false,
width: 460,
height: 170,
modal: true,
buttons: {
'No': function() {
$( this ).dialog( 'close' );
},
'Yes': function() {
$.ajax({
url: '<?php echo base_url().'index.php/admin/delete_data_id';?>',
data: {'emp_id' : data_id},
type:"POST",
success: function() {
$('#doubletrouble').dialog( 'close' );
//window.location.reload(true)
} //end success
});
} //end Yes
} //end buttons
});
});
});
Bookmarks