Javascript to detect where newly opened window came from
<p>Let's say I have a page, <code>http://mydomain.com/mypage.html</code>, with a "Back to page" link.  This link should take the user back to the page where they came from only if the previous page URL matches one of the following: <code>http://mydomain.com/one.html</code>, <code>http://mydomain.com/two.html</code>, and <code>http://mydomain.com/three.html</code>.  Otherwise, it would take the user back to the homepage, <code>http://mydomain.com</code>.  I would like the "Back to page" link to also take the user back to the homepage when <code>http://mydomain.com/mypage.html</code> is pasted onto the browser.  How can i accomplish this with Javascript.  Thanks!</p>
