[eluser]timpiele[/eluser]
What is the correct way to redirect to a CI URL in Javascript?
Code:
$.post('/dev/authenticate/', { username:username, password:password },
function(data) {
if (data === "1") {
[removed] = "/dev/admin/index";
}
else {
alert("Invalid Login");
}
}
);
[removed] doesn't work, it throws it into an endless loop because the controller is loading the admin/index view... how do I do this?
Inside the admin controller index method is:
Code:
$this->load->view('admin/index', $data);