In a javascript file (e.g. script.js) I need a variable that contains the absolute path to this file.
How can I do this dynamically?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The answer to this question (genius, didn’t know this was possible at all!) should yield the full URL to the file. This will work only when the script is included traditionally using a
scripttag, though.