|
Home > Archive > IIS Index Server > April 2004 > How do I encode a filesystem URL correctly in a results page?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How do I encode a filesystem URL correctly in a results page?
|
|
| Michel 2004-04-14, 4:46 pm |
| Hello,
I'm using the Indexing Server in Win 2K SP4 to index all my local file
system's files directly (i.e. in the "System" catalog) for my own local use.
I'd like to use the characterization data for each search hit (rather
than just the list of documents in the Start Menu Search applet).
This requires creating an ASP search query page and using the Win 2K IIS
server to view the results. Thus the "path" element of the results would
be prefixed with "file:///" and the backslashes replaced with forward
slashes, e.g. "file:///c:\Documents\example.html" becomes
"file:///c:/Documents/example.html".
This form of URL for local files works very nicely as long as I view the
results page in MS Internet Explorer but never works in Mozilla: nothing
opens in a new browser window when the link is clicked. I'm a complete
beginner with ASP, VBScript and HTML, this is how I generate the result
hit URL markup:
Response.Write "<a href=""" & "file:///" &
Replace(Results("path"), "\", "/") & """ target=""_blank"">" &
Results("DocTitle") & "</a>"
What am I doing wrong here?
I prefer using the Mozilla browser.
//
// Michel Joly de Lotbinière (please delete
// the DELETE in my email address
// if you wish to reply to me directly.)
//
| |
|
| OK, I've found a work-around with Mozilla: simply drag the local
file:/// URL into another open browser window.
Apparently, the other way is to use a signed page in which JavaScript is
allowed the privilege of removing the browser check that ensures a link
on a remote page does not open a file on the browsing machine's local
file system. Quite complicated.
|
|
|
|
|