locked
Question about asp account folder RRS feed

  • Question

  • User1451609391 posted

    Hello. I have a website that has a loading screen. This screen has a main div that loads from the site master page. It uses javascript but when i try to run my account pages they will not load the javascript. I think its because there is permission problems coming from the asp Account Folder. This problem has happened before so I wanted to fix it once and for all. All my other asp pages in the main website directory load javascript from the Scripts folder correctly but no .aspx files will from the account folder. Please help thanks.

    Thursday, August 1, 2019 2:36 AM

Answers

  • User409696431 posted

    If you want it to work for all pages, use src="/Scripts...   without the dot, and assuming Scripts is a folder directly under your site root.  The starting "/" means "start at the site root, and then look for the Scripts folder directly under that".

    Of course any links in your javascript have to be correct relative to any folder, too.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, August 1, 2019 4:21 AM

All replies

  • User409696431 posted

    Since we can't see your code, you've made it a guessing game.  What is different in how the javascript is referenced in the Account folder pages from how it is referenced in other pages?  What does the javascript do?

    Thursday, August 1, 2019 3:50 AM
  • User1451609391 posted

    My javascript runs a loading screen. I open many different .aspx pages like a contact page a downloads page and more but when i try to load and .aspx files out of the Account folder, the javascript file is not being loaded. In my site master I use this script <script src="./Scripts/script1.js"></script> It runs a loading screen. But in my masterpage when i load an files from the account folder it doesnt load the js file. I am thinking that maybe the way i write out the src isn't working correctly to files in the account folder. I also think that it may be some kind of webconfig or permissions problem. I Don't know how else I could write it. Thanks.

    Thursday, August 1, 2019 4:03 AM
  • User409696431 posted

    If you want it to work for all pages, use src="/Scripts...   without the dot, and assuming Scripts is a folder directly under your site root.  The starting "/" means "start at the site root, and then look for the Scripts folder directly under that".

    Of course any links in your javascript have to be correct relative to any folder, too.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, August 1, 2019 4:21 AM
  • User1451609391 posted

    It worked thanks.

    Thursday, August 1, 2019 2:49 PM