[eluser]vickel[/eluser]
I'm creating a modalwindow with a javascript call. This modalwindow has a form submit button, which when clicked must:
close the modalwindow itself (javascript)
and execute a corresponding PHP form method post action "dosomething.php" (e.g. open a new view which echos "success")
what happens, when using from my view:
Code:
echo form_open('controller/dosomething);
...
$js='onClick="parent.mywindow.hide()"';
echo form_submit('my_submit_ID', 'click me!',$js);
is: the javascript is executed first (window is closed) but the form method post action "dosomething.php" is only executed, once I reopen the modalwindow
that is why I'd like to know if I
can call the javascript from the controller :
I could first execute the javascript to close the modalwindow and as I'm allready in the controller "dosomething" anything like (echo "success") would be next...
thanks for any help