I have a problem calling a php file using javascript in codeignite.
This is my button:
<input type="button" name="update" value="Update" onClick="setUpdateAction();" />
And this is the script:
function setUpdateAction() {
document.frmUser.action = "edit_user.php";
document.frmUser.submit();
}
function setDeleteAction() {
if(confirm("Are you sure want to delete these rows?")) {
document.frmUser.action = "delete_user.php";
document.frmUser.submit();
}
}
The php file I want to call is inside the 'views' folder together with the php where the button code is located.