how to do a relative path redirection using javascript?
<p>I'm working on javascript/jquery in a php based site, and I have to redirect the page upon an event in the page.</p>

<p>lets say, on clicking the button "click me" in <code>"page1.php"</code>, the page should be redirected to "<code>page2.php</code>". This redirection has to be done using javascript/ jquery. Both pages are in the same folder, and the redirection code should use <strong>'RELATIVE LINKS'</strong>.</p>

<p>Now, I am able to redirect if I give the absolute link to <code>page2.php</code>, but could someone let me know how to do the same with a relative link?</p>

<p>something like: </p>

<pre><code>window.location.href = 'page2.php';
</code></pre>

<p>thanks.</p>
