Get the current script tag
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/403967/how-may-i-reference-the-script-tag-that-loaded-the-currently-executing-script">How may I reference the script tag that loaded the currently-executing script?</a>  </p>
</blockquote>



<p>I wan't implement this configurations options In a script whit this form</p>

<pre><code>&lt;script src="x.js" attr1="val1" attr2="val2" attr3="val3"&gt;&lt;/script&gt;
</code></pre>

<p>the problem is find the current script tag, and x.js can be in varius paths <code>fold1/x.js</code> 
<code>fold1/fold2/x.js</code>  <code>../fold/x.js</code>  etc... 
I think that is possible  because Dojo framework use this approach.</p>
