Link to open a folder

liunx

Guest
Hi, i am using HTML to make a simple hypertext menu, not a web site just a html page on my computer, i can do this ok but need some help<br />
<br />
the menu is to allow shortcuts to files<br />
this is easy using hyperlinks<br />
<br />
"but,,, how can i just open a folder,, not a file".<br />
<br />
so maybe i can click on a button in my menu and open the window<br />
"C:\my documents" <br />
<br />
i bet its real easy really<br />
<br />
thanks in advance<br />
JohnM1<!--content-->Most browsers will look for an index file if a user requests a directory without specifying a file. If no index file (eg index.html) exists, a 404 error will be produced.<br />
<br />
I hope i have understood you correctly.<br />
<br />
Regards.<!--content-->Address it the way you would a file.<br />
<br />
file:///c:/My%20Documents<!--content-->Originally posted by ray326 <br />
Address it the way you would a file.<br />
<br />
file:///c:/My%20Documents <br />
<br />
<br />
This is just what i needed, i knew it would be easy (for someone).<br />
<br />
it works for me without using the " % " is this ok? i am not sure of the relevance of the percent sign.<br />
<br />
thanks again, JohnM1<!--content-->Originally posted by johnm1 <br />
it works for me without using the " % " is this ok? i am not sure of the relevance of the percent sign. <br />
<br />
As you know the '%20' is the space. I know it works for windows and IE without the '%20': use the space instead. But I'm not sure if it works for all other! You must make is flexible solution... (a generic solution?? :confused: )<br />
<br />
JayDie<!--content-->Originally posted by JayDie <br />
As you know the '%20' is the space. I know it works for windows and IE without the '%20': use the space instead. But I'm not sure if it works for all other! You must make is flexible solution... (a generic solution?? :confused: )<br />
<br />
JayDie <br />
<br />
<br />
Yes thanks JayDie, now i understand, i agree on making code suit all browsers etc.<br />
in this case i only want a simple shortcut menu to my files and folders (on my computer not the web) so it works ok for me.<br />
<br />
thanks again this has been a successful thread for me, i appreciate the fast responses.<br />
<br />
JohnM1<!--content-->Originally posted by JayDie <br />
As you know the '%20' is the space. I know it works for windows and IE without the '%20': use the space instead. But I'm not sure if it works for all other! You must make is flexible solution... (a generic solution?? :confused: )<br />
JayDie <br />
It's not a valid URL with the imbedded space. Certain "dangerous" characters MUST be represented by their %hex value in a URL. I'd point you to an RFC but I don't know which one off the top of my head.<!--content-->Originally posted by ray326 <br />
It's not a valid URL with the imbedded space. Certain "dangerous" characters MUST be represented by their %hex value in a URL. I'd point you to an RFC but I don't know which one off the top of my head. <br />
<br />
Hi ray<br />
i guess you are really answering JayDie here.<br />
i think Jaydie was helping me to understand the use of "%20" in your original answer, with due respect JayDie did go on to advise me to follow best practice and use the most inclusive solution e.g. by keeping the %20 in.<br />
<br />
this is why these forums are so good for information exchange and debate.<br />
<br />
like i said, this one has worked for me and i only needed it as a solution to a non-web project. but now the answer is here for anyone doing a proper job.<br />
<br />
thanks again JohnM1<!--content-->Originally posted by ray326 <br />
...Certain "dangerous" characters MUST be represented by their %hex value in a URL...<br />
Originally posted by johnm1 <br />
...JayDie did go on to advise me to follow best practice and use the most inclusive solution e.g. by keeping the %20 in....<br />
Yes, that's right. In johnm1's case, he choose not to use it. As I said, you must choose the best solution, working for all systems (so use the %20). Johnm1 is using it for himself, we don't use it. I think it's better to learn yourself to use it, cause it works always!<br />
Originally posted by ray326 <br />
...I'd point you to an RFC but I don't know which one off the top of my head.....<br />
What do you mean with this (sorry, my english isn't perfect...)?<!--content-->escape("It's me!") // result: It%27s%20me%21<br />
<br />
Russian Academy (<!-- m --><a class="postlink" href="http://www-sbras.nsc.ru/docs/ms/js/120.htm">http://www-sbras.nsc.ru/docs/ms/js/120.htm</a><!-- m -->)<br />
MSDN Library (<!-- m --><a class="postlink" href="http://msdn.microsoft.com/library/en-us/script56/html/vsfctEscape.asp">http://msdn.microsoft.com/library/en-us ... Escape.asp</a><!-- m -->)<br />
<br />
The Escape function returns a string (in Unicode format) that contains the contents of charString. All spaces, punctuation, accented characters, and other non-ASCII characters are replaced with %xx encoding, where xx is equivalent to the hexadecimal number representing the character. <br />
There is also an 'unescape' function!<!--content-->Are you asking about RFCs? RFC stands for Request For Comment. RFCs are the "specifications" for the Internet protocols. Here's one place you can find them.<br />
<br />
<!-- m --><a class="postlink" href="http://www.freesoft.org/CIE/RFC/index.htm">http://www.freesoft.org/CIE/RFC/index.htm</a><!-- m --><br />
<br />
Here's what RFC 1945 (HTTP) says about it:<br />
<br />
"The Request-URI is transmitted as an encoded string, where some characters may be escaped using the "% HEX HEX" encoding defined by RFC 1738 [4]. The origin server must decode the Request-URI in order to properly interpret the request."<!--content-->
 
Back
Top