javascript, get script path from inside the script
<p>Is it possible to get the Javascript server path?</p>

<p>For example, I have a javascript file that is in a directory, and in that directory there are some php scripts that I want to "post" to. </p>

<p>When I include the javascript file in my home page</p>

<pre><code>&lt;script type="text/javascript" src="assets/js/some.js"&gt;&lt;/script&gt; 
</code></pre>

<p>I can't access say a file like /post.php that resides in the assets/js/ directory using relative paths since the javascript is not being "run" in the directory that the home page is in.</p>

<p>Obviously, I can specify the path, but I was trying to think of a  more robust way.</p>

<p>I know you can get the "script" tags and get the url of the file, and I could probably work from there, but I didn't know if such a function exists, that would just tell you.</p>

<p>Thank you!</p>
