Getting the current js folder?

Discussion in 'ASP .Net' started by Edwin Knoppert, Nov 17, 2005.

  1. 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.
     
    Edwin Knoppert, Nov 17, 2005
    #1
    1. Advertising

  2. 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.
     
    Tasos Vogiatzoglou, Nov 17, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. THY
    Replies:
    3
    Views:
    2,942
    Alvin Bruney
    Oct 16, 2003
  2. William LaMartin

    _vti_cnf folder in the bin folder-- a problem?

    William LaMartin, Nov 10, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,703
    Oliver
    Nov 10, 2003
  3. Dan
    Replies:
    7
    Views:
    18,575
    catherine sea
    Oct 28, 2010
  4. Jon Maz
    Replies:
    12
    Views:
    4,795
    Vadim Chekan
    Jul 1, 2004
  5. madhu
    Replies:
    0
    Views:
    418
    madhu
    Oct 5, 2006
Loading...

Share This Page