title: Using relative urls with window.open
body: <p>I am using below JS code to open new window by populating dynamic generated code..</p>
  
  <pre><code>function OpenWindow(obj) {
      var w = window.open();
      var stored = $(obj).parent().find("div").html();
      w.document.title = "New Window";
      w.document.URL = "hello.com/dummypage.html"; //how to assign the url to the newly opened window
      $(w.document.body).html(stored);
      return false;
  }
  </code></pre>
  
  <p>Relative urls used in this document say for <code>img src</code>, in this document is not working.</p>
  
  <pre><code>&lt;tr&gt;&lt;td colspan='2' align='center'&gt;&lt;img id='imglegend' src='/images/Legend.jpg'&gt;&lt;/td&gt;&lt;/tr&gt;
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I populate the content dynamically using javascript, just need a valid url in the brower window, to make my hyperlinks &amp; image source ref to work.</p>
  
  <p>P.S. The page pointed out in the js code, doesn't have physical existance.</p>