Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.java.* > Newsgroup comp.lang.javascript

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 12-23-2006, 08:35 PM
Jeff
Guest
 
Posts: n/a
Default specifying paths



I don't have much knowledge of javascript, but need to place a very small
amount in a web page. I figured out everything other than how to properly
call a page in another folder/directory. Apparently javascript doesn't like
some of the dos and unix conventions with which I'm familiar. Could someone
tell me now to properly specify a path name in javascript (i.e., how to
refer to a page that is in the parent folder similar to below, which doesn't
work)

~\Comments.htm


Thanks

Jeff


--
Posted via a free Usenet account from http://www.teranews.com

Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 12-23-2006, 08:50 PM
David Dorward
Guest
 
Posts: n/a
Default Re: specifying paths

Jeff wrote:

> I don't have much knowledge of javascript, but need to place a very small
> amount in a web page. I figured out everything other than how to properly
> call a page in another folder/directory. Apparently javascript doesn't
> like some of the dos and unix conventions with which I'm familiar. Could
> someone tell me now to properly specify a path name in javascript


JavaScript doesn't come with any functions to access files, they are all
provided by the host environment. The syntax depends on the what you are
passing this "path name" to, but I can't think of any browser based
examples where it is different to a normal URL (relative or otherwise).

> (i.e., how to refer to a page that is in the parent folder similar to
> below, which doesn't work)


> ~\Comments.htm


Umm. The UNIX convention is that ~ is shorthand for "the current user's home
directory", a concept that doesn't exist in URLs (although some systems
map /~username/ onto a user specific directory
(typically /home/username/public_html)).

UNIX file paths use "/" as the seperator, not "\" though.

Further reading:
http://www.utoronto.ca/webdocs/HTMLd...wHTML/url.html
http://www.iusmentis.com/technology/www/relativeurls/
http://www.ietf.org/rfc/rfc1738.txt
http://www.ietf.org/rfc/rfc1808.txt


--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Reply With Quote
  #3 (permalink)  
Old 12-23-2006, 09:31 PM
Jeff
Guest
 
Posts: n/a
Default Re: specifying paths


"David Dorward" <dorward@yahoo.com> wrote in message
news:emk8at$909$1$8300dec7@news.demon.co.uk...
> Jeff wrote:
>
>> ~\Comments.htm

>
> Umm. The UNIX convention is that ~ is shorthand for "the current user's
> home
> directory", a concept that doesn't exist in URLs (although some systems
> map /~username/ onto a user specific directory
> (typically /home/username/public_html)).
>
> UNIX file paths use "/" as the seperator, not "\" though.
>
> Further reading:
> http://www.utoronto.ca/webdocs/HTMLd...wHTML/url.html
> http://www.iusmentis.com/technology/www/relativeurls/
> http://www.ietf.org/rfc/rfc1738.txt
> http://www.ietf.org/rfc/rfc1808.txt


I'm sure that I wasn't using the correct terminology to describe the
question accurately. ...and part of the problem is that I'm mixing asp.net
with a small bit of java.

One of the pages that you provided gave me the answer, however.

.../../comments.htm

got me to the right page.

Thanks



--
Posted via a free Usenet account from http://www.teranews.com

Reply With Quote
  #4 (permalink)  
Old 12-24-2006, 01:09 AM
David Dorward
Guest
 
Posts: n/a
Default Re: specifying paths

Jeff wrote:

> I'm sure that I wasn't using the correct terminology to describe the
> question accurately. ...and part of the problem is that I'm mixing asp.net
> with a small bit of java.


Java and JavaScript are entirely different languages (and you can write ASP
in JScript which is Microsoft's version of JavaScript)

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to open/read message file using the -MSG paths apeytchev@gmail.com Newsgroup comp.soft-sys.sas 0 08-11-2006 07:35 PM
Re: direct and indirect relationships (paths) David L Cassell Newsgroup comp.soft-sys.sas 0 04-14-2006 04:18 AM
direct and indirect relationships (paths) Darryl Wilson Newsgroup comp.soft-sys.sas 0 04-13-2006 03:42 PM
Re: Perhaps a PRX question Alan Churchill Newsgroup comp.soft-sys.sas 0 04-06-2006 11:10 AM
Re: Macro parsing question Fehd, Ronald J. PHPPO Newsgroup comp.soft-sys.sas 0 12-30-2004 02:42 PM



All times are GMT. The time now is 01:31 PM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.