[eluser]Paleleaves[/eluser]
Hi,
My issues is with jquery and codeigniter. That's why posted here...
I've an image delete confirmation dialog box in jquery, that is below. Receiving ID of the image to be deleted in var myid. Please see the full code below!
Code:
[removed]
$(document).ready(function(){
$('.delete').click(function(){
var myid = $(this).attr("id");
$.confirm({
'title' : 'Delete Confirmation',
'message' : 'You are about to delete this item. <br />It cannot be restored at a later time! Continue?',
'buttons' : {
'Yes' : {
'class' : 'blue',
'action': function(){
// I want to call the controller here. This JS file included as a separate file.
}
},
'No' : {
'class' : 'gray',
'action': function(){
} // Nothing to do in this case. You can as well omit the action property.
}
}
});
});
});
[removed]
Please see the commented area in code where i need to call the controller. I tried jquery $.post() method but didn't workout. Also another problem is setting the site base_url(); inside the javascript. Any help for this really helpful.
Thanks in advance