Issues with absolute paths for js files in website

Posted by Vinni on Stack Overflow See other posts from Stack Overflow or by Vinni
Published on 2010-04-21T10:53:43Z Indexed on 2010/04/21 13:13 UTC
Read the original article Hit count: 372

Filed under:
|
|
|

Hello guys,

I have a website which has so many sub folders in it. I have following paths references to my js and css files.

    <link rel="stylesheet" type="text/css" href="css/styles.css" />
 <script type="text/javascript" src="js/jquery.js"></script>

the above code is working fine on my local machine. the JS file is not loading when i host the website into production server. Problem in my hosting server is my website is ponted to

www.somewebsitename.com

instead

www.somewebsitename.com/home.aspx

. When I load the page with www.somewebsitename.com/home.aspx this url it is loading all the js files it is not loading files only when I load the page with www.somewebsitename.com.

Please solve my problem. How to reference JS files so that they ll loaded how ever u visit the page.

© Stack Overflow or respective owner

Related posts about html

Related posts about JavaScript