These 4 lines is the related code:
According from the answer in stackflow, Joomla does not support something like that but Javascript does:
window.history.back()
Change the code which echo JavaScript to html webpage to use joomla setRedirect() to make redirection. This is the original code:
if (!$db->store()) {to
echo "<script>alert('".$row->getError()."');window.history.go(-1);</script>\n";
exit();
}
if (!$db->query()) {Reference:
$url = htmlspecialchars($_SERVER['HTTP_REFERER']);
$this->setRedirect($url);
exit();
}
http://stackoverflow.com/questions/12948109/return-to-previous-page-in-joomla
No comments :
Post a Comment