Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #18201

Re: Locate file in the website

From Martin Leese <please@see.Web.for.e-mail.INVALID>
Newsgroups comp.lang.javascript
Subject Re: Locate file in the website
Date 2013-01-22 08:28 -0700
Organization A noiseless patient Spider
Message-ID <kdmb7r$182$1@dont-email.me> (permalink)
References <kdlq62$r2j$1@dont-email.me>

Show all headers | 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


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