I am trying to write a script for a button that onclick it will redirect to the designated address than scroll to the position. but i'm having some trouble with getting it to scroll after it goes to the designated url. can someone help?

heres what I have:
Code:
function linkMenu(){
	
	window.location.href = "../AllMenu2.php";
	if(true){scrollBreakfast();}
	}
	
function scrollBreakfast()
{	
	window.scrollTo(0,315)
	alert('scroll executed')
	
}