I have been struggling with page reloads
I have a form that will submit data regardless of the line on the table that is updated.
When the form reloads, I can either get the page to reload the whole page or jump to an anchor, but not both.
The first part is
form
hidden value (with anchor) this works
On button click call function
function is in php with :
// this code will show editWonLost.php#123456 but does not reload
echo "<script type='text/javascript'>location.hash='$NeedToUpdate'; document.location = 'editWonLost.php'+location.hash</script>";
// this code will show editWonLost.php#$NeedToUpdate
echo '<script type="text/javascript">location.hash="$NeedToUpdate"; document.location = "editWonLost.php"+location.hash</script>';
// this code will refresh the page but not got to anchor location
echo '<script type="text/javascript">document.location = "editWonLost.php"</script>';
The goal is to try get the page to reload and then jump to the location