I am losing my "\" character in a string. How do I put them back in?
I am passing an asp variable into a javascript function. The variable is a url with value = \\myserver\
The problem is that javascript is removing the "\" because it is a "special" character.
Any idea how I can deal with this so the url gets written out exactly as it was passed in.
**I'm building dynamic link with asp, and passing it to a js function like this *****************************
Response.Write ("<img src=""library/icons/dir_belllogo.gif"" alt=""edit"" onclick=""javascript:showFileProperties(' "& objFile.Name &" ')"">"
*****************************
the variable or js parameter is actually a file name that looks like this
\\qaserver\intranet\library\forms\agent.pdf
When it gets passed to the javascript function, and then written out to html in the browser, this same file name looks like this:
\qaserverintranetlibraryformsagent.pdf
How do I avoid this? any help is appreciated!
Liz
I am passing an asp variable into a javascript function. The variable is a url with value = \\myserver\
The problem is that javascript is removing the "\" because it is a "special" character.
Any idea how I can deal with this so the url gets written out exactly as it was passed in.
**I'm building dynamic link with asp, and passing it to a js function like this *****************************
Response.Write ("<img src=""library/icons/dir_belllogo.gif"" alt=""edit"" onclick=""javascript:showFileProperties(' "& objFile.Name &" ')"">"
*****************************
the variable or js parameter is actually a file name that looks like this
\\qaserver\intranet\library\forms\agent.pdf
When it gets passed to the javascript function, and then written out to html in the browser, this same file name looks like this:
\qaserverintranetlibraryformsagent.pdf
How do I avoid this? any help is appreciated!
Liz