title: Failing to load script files in target page after window.open()
body: <p>I am using webstorm to open my webpages.</p>
  <p>Basically, I have a customers.js that contains <code>window.open(&quot;../customers-form.html&quot;)</code>, and customers-form contains a script with <code>src=&quot;./scripts/customer-form.js&quot;</code>.</p>
  <p>When I open customers-form.html directly, the script runs fine, but there is a problem with accessing it through <code>window.open()</code> from the other file.</p>
  <p><code>GET http://localhost:63342/scripts/customers-form.js net::ERR_ABORTED 404 (Not Found)</code></p>
  <p>Thank you for your time!</p>
  <p><strong>EDIT:</strong><br>
  I noticed that the link when I am in customers.html is <code>localhost:63342/WDF/customers.html</code>, but <code>localhost:63342/customers-form.html</code> after <code>window.open()</code>. This probably is the problem, but I have no idea how this can be fixed. For some reasong, webstorm is loading customers-form.html outside of its parent folder WDF.</p>
  <p><strong>EDIT 2:</strong><br>
  I fixed it by using <code>location.href = &quot;../../WDF/customers-form.html&quot;</code>.</p>