Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

URLS, Netscape and paths 1

Status
Not open for further replies.

malonep

Programmer
Jul 14, 2004
44
CA
Hi,

I determine a path to an uploaded file in asp and then link to it. It works fine in IE but when I try to view it in netscape I get file not found.

<%
lcPath = http:" & "\\Pluto\Upload\"
lcFileName = "temp.html"
%>
<a href="http:<%=lcPath%><%=lcFileName%>">Temp File </a>

In IE the page opens fine.

In Netscape it says page cannot be found and if I go into page info (for the page not found) I get
URL: if I view the page source of the page with the link
the URL are showing properly.

how do I force netscape to give the appropriate URL?

Thanks,
 
<%
lcPath = http:" & "//Pluto/Upload/"
lcFileName = "temp.html"
%>


maybe this works???

Known is handfull, Unknown is worldfull
 
There's got to be a small problem in the code. Please copy and paste the lines that create the URL (it's clear in your post that you didn't copy and paste them, you must have re-typed them or something, because
Code:
  lcPath = http:" & "\\Pluto\Upload\"
has a clear syntax error in it, a missing opening double-quote). With the actual code we might be able to spot the problem.
 
Missing the lead quote, i'm surprised it's even working

<%
lcPath = [COLOR=black red]"[/color] lcFileName = "temp.html"
%>
<a href="http:<%=lcPath & lcFileName%>">Temp File </a>



[thumbsup2]DreX
aKa - Robert
if all else fails, light it on fire and do the happy dance!
 
As in my post, that can't be his code because he'd be receiving a syntax error.
 
The sample output does not match the pasted code, even if the missing quote were there. There is a logic error in the example on top of the missing quote:
Code:
<%
  lcPath = "[highlight]http:[/highlight]" & "\\Pluto\Upload\"
  lcFileName = "temp.html"
%>
<a href="[highlight]http:[/highlight]<%=lcPath%><%=lcFileName%>">Temp File </a>

If this was really the code then your output would look like:
http:http:\\Pluto\Upload\temp.html

Although you would probably have some escapes (and maybe a localhost) in there as it tried to resolve a legal address out of it.

-T

barcode_1.gif
 
I just copied the code over wrong.
lcPath = "http:\\Pluto\Upload\"
copied code is:

lcPath = Session("UploadPath")
(where Session("UploadPath") = "\\Pluto\Upload\" )

<td valign=top>
<a href="<%=lcPath%><%=lcFileName%>">
<b>
<%=lcFileName%>
</b>
</a>
</td>

I put the code back to this way because it works for IE. my question is

with or with out the http://

I cannot get the link to work in netscape.

If I physically type in
<a href="\\Pluto\Upload\temp.html">
it will work in netscape but when I change it back to the above <a href="<%=lcPath%><%=lcFileName%>">
netscape says file cannot be found and the URL is listed as

(if I view source of the page the url is valid
<a href="http:\\Pluto\Upload\temp.html">
But when I click on the link
netscape no links to a valid url

(only if I use <%=lcPath%> instead of "\\Pluto\Upload")

--- and both ways work in IE

(Path is dynamic so I cannot just hard code it) :(

Thanks in advance
malonep
 
your slashes are the wrong direction, you're getting urlencoding hence the %5C stuff, change all "\" to "/"

[thumbsup2]DreX
aKa - Robert
if all else fails, light it on fire and do the happy dance!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top