Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Spaces in directory names -- ugly!!
July 31, 2004, 5:25 pm
rate this thread
any similar posting.
Been developing pages for a few months, getting up to speed in
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
DocumentsDev, 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,
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
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
Strip it to match my non-working version. Still works fine.
Light starts to dawn. Copy it to my development directory, C:My
DocumentsDev. 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
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 . . .
Re: Spaces in directory names -- ugly!!
> [...] 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
| ) 111010111011 | http://bednarz.nl /
| ) Distribute me: http://binaries.bednarz.nl/mp3/aicha
Re: Spaces in directory names -- ugly!! -- correction to typos
"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 . . .