title: How to resolve a javascript path for pages that have different directory levels?
body: <p>I have a javacript file (script.js, for example) in the following location:</p>
  
  <p>/Website/Shared/Js/script.js</p>
  
  <p>I have two pages which use this javascript, but each one of them seems to require a different path and I can't figure out how to resolve both of them.</p>
  
  <p>One of them is the page:</p>
  
  <p>/Website/One/Two/Three/page.aspx and this requires the path:</p>
  
  <pre><code>&lt;script src="../../../Shared/Js/script.js" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>The other page is:</p>
  
  <p>/Website/One/Two/page.aspx and this requires the path:</p>
  
  <pre><code>&lt;script src="../../Shared/Js/script.js" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>I tried to come from the root by doing</p>
  
  <pre><code>&lt;script src="../Shared/Js/script.js" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&lt;script src="/Shared/Js/script.js" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>but none of these seem to work.  The temp solution I have found is to declare the script twice which is dumb, but that is all I can think of now.</p>