how to change page from within javascript
<p>i have the following code that changes the pages from within javascript:</p>

<pre><code>var newUrl = [some code to build up URL string];
window.location.replace(newUrl);
</code></pre>

<p>but it doesn't change the top URL, so when someone clicks the back button it doesn't go back to the previous page.</p>

<p>how can i have javascript change the top URL as well so the browser back button works.</p>
