Hi,
I am not a JSP programmer, but I recently wrote an .asp page to load an
applet.
One problem is that one string (compname) lost '\' in it: the original name
should be "system 1\cab 2\node 3", but what I got is "system 1cab 2node 3".
The function call is:
function DoMyFunc(arg1, arg2, compname)
{
if(compname = "")
url = "../../mypage.asp?server=" + arg1 + "&port=" + arg2;
else
url = "../../mypage.asp?server=" + arg1 + "&port=" + arg2 +
"&Name=" + compname;
}
The partial caller function is:
...
str = str + " <a href='JavaScript:DoMyFunc( """ & Node.PlanAddress &
""", 22, """ & Node.DisplayName & """)' class=mylink><font
size=""-2"">SSH</font></a>"
...
I added 'encodeURI()' on compname (so the code likes: url =
"../../mypage.asp?server=" + arg1 + "&port=" + arg2 + "&Name=" +
encodeRUI(compname); ), and also to the string in the caller function
(making it as:
...22, encodeURI(""" & Node.DisplayName & """))' class=...), but not worked.
Can anybody help me out in the issue?
Thanks,
Peter
Jacob Yang [MSFT] - 22 Nov 2003 01:43 GMT
Hi Peter,
Thank you for posting to the MSDN newsgroups.
I noticed that you have posted the same question in this group.
Losing '\' in passing string...
A member of the community posted a response to your question in that
thread. Please check it when you have time.
If I have misunderstood your concern, please feel free to let me know.
Best regards,
Jacob Yang
Microsoft Online Partner Support
Get Secure! ?C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.