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