Hey guys,

Just a quick question regarding a problem I'm having and some code is provided below for the proof of concept. I'm trying to develop a very simple script that basically goes to another page, but remembers the scroll position from the previous one. I have a gut feeling that I can't transmit this kind of data without using perhaps using a cookie. If you load up the example code, and scroll down to the link and click it, it reloaded the page but doesn't return to the scroll position.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<title>Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<script type="text/javascript">
function doChange()
{
	var x = window.pageXOffset;
	var y = window.pageYOffset;
	window.location = window.location.toString();
	window.scrollTo(x,y);
}
</script>

</head>

<body id="n-home">
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<h1><a href="#" onclick="doChange();">CLICK ME</a></h1>
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br 

/><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br 

/><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br 

/><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />

asdfasdfasdfasdf
</body></html>
Regards,
- Dean