Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #18201
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Martin Leese <please@see.Web.for.e-mail.INVALID> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: Locate file in the website |
| Date | Tue, 22 Jan 2013 08:28:50 -0700 |
| Organization | A noiseless patient Spider |
| Lines | 39 |
| Message-ID | <kdmb7r$182$1@dont-email.me> (permalink) |
| References | <kdlq62$r2j$1@dont-email.me> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Tue, 22 Jan 2013 15:29:00 +0000 (UTC) |
| Injection-Info | mx04.eternal-september.org; posting-host="61510e65ac3821c2ec601e96e0faac97"; logging-data="1282"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/T9AN313GlCRrowWRmvtzl" |
| User-Agent | Thunderbird 1.5.0.14 (Windows/20071210) |
| In-Reply-To | <kdlq62$r2j$1@dont-email.me> |
| Cancel-Lock | sha1:8z/ro3gn+XYzhEGfhscVN9TGdCM= |
| Xref | csiph.com comp.lang.javascript:18201 |
Show key headers only | View raw
Tony wrote:
> Hello!
>
> I don't use ASP.NET but if I did I could use ~ do indicate the root
> directory for my website but now I only use html.
>
> So if I have html files under directory WebsiteRoot/html
> and
> javascript files under WebsiteRoot/Javascript
> and
> css files under WebsiteRoot/Style
>
> If I want to locate files is the only way to use relative adressing in
> this way
> <link href="../Style/InPort.css" rel="stylesheet" type="text/css" />
> <script src="../JavaScript/jquery/jquery.js" type="text/javascript" />
I use the <base> element for addressing
relative to a base. Something like:
<base href="http://your.web.site/">
<link rel="stylesheet" href="Style/InPort.css" type="text/css">
<script defer type="text/javascript"
src="JavaScript/jquery/jquery.js"></script>
Note that you are using XHTML, not HTML.
You could also specify the full paths for
absolute addressing.
Finally, you might get a better response from a
newsgroup concerned with HTML, perhaps:
comp.infosystems.www.authoring.html
--
Regards,
Martin Leese
E-mail: please@see.Web.for.e-mail.INVALID
Web: http://members.tripod.com/martin_leese/
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Locate file in the website "Tony" <tony.johansson@inport.com> - 2013-01-22 11:37 +0100 Re: Locate file in the website Martin Leese <please@see.Web.for.e-mail.INVALID> - 2013-01-22 08:28 -0700 Re: Locate file in the website Danny <dann90038@gmail.com> - 2013-01-22 12:55 -0800 Re: Locate file in the website Osmo Saarikumpu <osmo@weppipakki.com> - 2013-01-23 09:53 +0200
csiph-web