mirror of https://github.com/ShaYmez/xlxd.git
dashboard2: use location.reload() to keep page scroll position
use location.reload() to keep page scroll position on page refreshes, but keep using location.href method for POST requests to avoid browser asking to resubmit data on reloads
This commit is contained in:
parent
7ec97b2c9e
commit
27377a4d62
|
@ -108,12 +108,19 @@ if ($CallingHome['Active']) {
|
|||
echo '
|
||||
<script>
|
||||
|
||||
function ReloadPage() {
|
||||
function ReloadPage() {';
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
echo '
|
||||
document.location.href = "./index.php';
|
||||
if (isset($_GET['show'])) {
|
||||
if (isset($_GET['show'])) {
|
||||
echo '?show=' . $_GET['show'];
|
||||
}
|
||||
echo '";';
|
||||
} else {
|
||||
echo '
|
||||
document.location.reload();';
|
||||
}
|
||||
echo '";
|
||||
echo '
|
||||
}';
|
||||
|
||||
if (!isset($_GET['show']) || (($_GET['show'] != 'liveircddb') && ($_GET['show'] != 'reflectors') && ($_GET['show'] != 'interlinks'))) {
|
||||
|
|
Loading…
Reference in New Issue