the situation is, I want to show the modal once the form submission is successful. what i currently do is, after I submit and the form was submitted successfully, I redirect to the same input page. Now the question is, is it possible to set the flash data and pass a jquery script to toggle the modal upon redirection ? here's how i set it in the controller function after the submission was successful.
$js = "<script>$('#mymodal').modal('show');</script>";
$this->session->set_flashdata('js',$js);
then on the view file , I placed a checker at the top so that I will get triggered upon redirection to it.
if($this->session->flashdata('js')){
echo $this->session->flashdata('js');
}
but unfortunately, the modal didn't get triggered to popup at all.. show how ?