Can I call a javascript function in model of codeigniter?
I made a modal in my view..
<div class="modal fade" id="success" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-haspopup="true" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="alert alert-success fade in" id="alert">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4>Success!</h4>
<p>Record successfully deleted.</p>
<a id="okButton" class="btn btn-success" data-dismiss="modal">
OK
</a>
</div>
</div>
</div>
and in my model
public function delete_job_title($P1)
{
if (success condition)
{
what could should i put in here to call the function in javascript? or to show the modal?
}
}
I don't know what to put in there in order to show the modal?. whereas in jquery you can show it by:
" $('#success').modal('show'); "
but I want to call it in my model.
My main question is there a way to call a function in javascript from a model of codeigniter?
whereas in my javascript:
function showsuccess()
{
$('#success').modal('show');
}