Getting the current js folder?

E

Edwin Knoppert

I'm loading a javascript source via the SRC="myfile.js" ..
Can i determine the (relative) location of this file IN the javascript
source itself?

I want to determine IN "myfile.js" where it's been located.
This source needs to load other stuff from that folder.
I want to have it dynamic.

<% asp.net %> do not work in js files.
 
T

Tasos Vogiatzoglou

You cannot get the relative location of the js file (only of the page
that loads the file).

If you want to do dynamic js, you have to solutions.

Either output the JS to the aspx page, or create an HTTP handler to
handle the js files.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top