straycat264
02-02-2006, 12:18 PM
I'm in the middle of a slightly surreal bit of AJAX experimentation, which involves, amongst many other things, the dynamic loading / unloading of javascript, sans page reloads.
Now leaving aside, for the moment, the discussion on whether or not this is actually a good idea...
When loading a js file using:
<script type="text/javascript" src="/folder/script.js"></script>
Is it possible for the script running in script.js to be able to identify the <script> element that is loading it, and to access it as an object? I have my suspicions that it isn't possible... but if it is, it would be extremely useful to me.
Now leaving aside, for the moment, the discussion on whether or not this is actually a good idea...
When loading a js file using:
<script type="text/javascript" src="/folder/script.js"></script>
Is it possible for the script running in script.js to be able to identify the <script> element that is loading it, and to access it as an object? I have my suspicions that it isn't possible... but if it is, it would be extremely useful to me.