Referencing External Style Sheet

I changed a folder to a sub-domain: it went from www.example.com/app to app.example.com

I was using some ASP includes as well
<!--#INCLUDE FILE="../../../includes/header.html" -->

Open in new window

All the ASP includes work.
The style sheet and JavaScript are not found
<link href="../../../includes/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../includes/external_window.js"></script>

Open in new window

Is there another way to do this or do I need to use an absolute path?

Here is the link http://android-apps.coreybryant.com/spbsoftware/spbsoft-shell-3d if that helps.
LVL 29
coreybryantAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

remorinaCommented:
The subfolder android-apps changed to a sub domain, the folder can also be accessed through http://coreybryant.com/android-apps/spbsoftware/spbsoft-shell-3d/ which would work correctly.

I can see your CSS and JS files at

http://coreybryant.com/includes/style.css
and
http://coreybryant.com/includes/external_window.js

The problem is that now the files are out of the scope of the subdomain, so relative paths would not work, so you need to either link to them using absolute domain paths such as below

<link href="http://coreybryant.com/includes/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://coreybryant.com/includes/external_window.js"></script>

Open in new window


Or copy the includes folder under the android-apps folder so you can access it by relative paths using

<link href="/includes/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/includes/external_window.js"></script>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
coreybryantAuthor Commented:
Thanks, I thought I would have to do that.  I just never ran into the issue with the ASP includes (that are in the same folder as the JS / CSS) would work and the CSS / JS would not (usually it was the other way around).
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.