473,320 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

Dec 23 '06 #1
3 1378
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
Dec 23 '06 #2

"David Dorward" <do*****@yahoo.comwrote in message
news:em*******************@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

Dec 23 '06 #3
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
Dec 24 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Timothy Madden | last post by:
Hello all I'm trying to include some files in an included file. Think of some scripts like this /index.php /scripts/logging.php /scripts/config.php /scripts/db_access.php
5
by: Noah | last post by:
Does anyone have a function to convert back and forth between NT style paths and POSIX style? It seems trivial, but I want to make sure I don't overlook some obscure detail. Is it a simple matter...
24
by: Lovely Angel | last post by:
Dear Friends Hope you doing great. I have recently shifted to a webhost which is Using Windows 2003 and IIS 6. Now my application was working fine earlier but now I am facing this problem ...
6
by: busterama | last post by:
It's probably something simple, but I just can't find the solution. I'm using the javascript slideshow code at http://javascript.internet.com/miscellaneous/fading-slide-show.html for a slideshow...
8
by: nick | last post by:
I have a problem and I've been using a cheezy work around and was wondering if anyone else out there has a better solution. The problem: Let's say I have a web application appA. Locally, I set...
0
by: Chris Gill | last post by:
I'm trying to use cookieless sessions in asp.net using the InProc mode (for various reasons it is not desirable for us to use the other modes if it is possible to avoid them). My problem revolves...
3
by: JeffDotNet | last post by:
I wrote a small data processing application that writes a summary of several hundred files. I use drag and drop on a panel (Panel1) to grab the absolute path to each of these files. Then I begin...
5
by: costantinos | last post by:
Hello. I have implemented the Dijkstra shortest path algorithm, it works fine but I have one question on how I can improve something. I want to find all the possible shortest paths from a node...
6
by: Jon Slaughter | last post by:
do I have to prefix every absolute path with document root to get it to work? For some reason I thought that prefixing a path with '/' or './' with make it absolute w.r.t to document root but I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.