|
|||
|
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 |
|
|
||||
|
||||
|
|
|
|||
|
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 |
|
|||
|
"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 |
|
|||
|
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 |
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |