By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,879 Members | 1,859 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,879 IT Pros & Developers. It's quick & easy.

Spaces in directory names -- ugly!!

P: n/a
I can't believe I'm the first to encounter this, but I've not found
any similar posting.

Been developing pages for a few months, getting up to speed in
javascript tricks, inline incremental searching, other neat stuff.
Working on my machine (Win2K, various editors -- not page development
tools, like to get my hands dirty in the code), viewing the pages in
IE6 from the local directory for testing, etc. Working in C:\My
Documents\Dev, already knew and was using "%20" rather than the space
in "My Directory" in the addresses. No problem.

Needed pages -- FAQs, actually -- where the links to each would
include anchor refs, as in www.faqpage.html#ans20. Not complicated,
right?

Could NOT get them to work. Stripped it down to a test page with
everything removed but a bunch of text blocks and the anchors -- no
startup javascript, no dynamic code at all, just the basics. Still,
the IE opening of the local-file URL with the hash anchor value will
NOT scroll the page to that anchor.

Found examples on the Web of working anchor refs. Captured the
source, created one such page locally, in C:\Temp. It works just
fine.

Strip it to match my non-working version. Still works fine.

Light starts to dawn. Copy it to my development directory, C:\My
Documents\Dev. IT STOPS WORKING! Page loads, but does not go to the
anchor. Whether I cite it with the space or the %20, it will not
work.

Am I really the first to discover that, when testing pages locally, do
NOT have them sitting in a directory where the complete address string
contains spaces, even if you replace the spaces with %20?

Time to start drinking . . .
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
ga**@labdata.com (NeverLift) writes:
[...] as in www.faqpage.html#ans20. Not complicated, right?
I'm not sure; even if we wildly guess that this is supposed to be some
kind of host name, it looks complicated enough to me to resolve the TLD
'html' (and a fragment identifier usually addresses a file, not a host).
Am I really the first to discover that, when testing pages locally, do
NOT have them sitting in a directory where the complete address string
contains spaces, even if you replace the spaces with %20?


Who knows (or even cares)? *Testing* webpages locally requires running
a webserver locally (this is not the place to learn how to do that, BTW,
or for inquiries about file system conventions of one or the other
minority OS).
Cheers
--
| ) 111010111011 | http://bednarz.nl/
-(
| ) Distribute me: http://binaries.bednarz.nl/mp3/aicha
Jul 20 '05 #2

P: n/a
Sorry about that. Of course, I meant
"www.somedomain.com/faqpage.html#ans20". And my testing technique
starts with a simple double-click on the file name in the directory
(Windows Explorer) which opens it in my browser, then I add the
"#ans20" and Go; from then on, just keep refreshing as I make
changes.(Except that, once in a while, changing the base file results
in the IE6 window that cites it closing -- but not always. Gave up
trying to figure out why it sometimes closes, sometimes not -- on the
same page/file name. And sometimes the refresh doesn't take unless I
erase the Internet cache . . .) Once it's working that way, then it
gets uploaded to my server, checked out in various browsers.

Oh, yes, that should read replacing the space in "My Documents", not
"My Directory", with "%20".

Too much frustration venting while typing . . .
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.