Connecting Tech Pros Worldwide Forums | Help | Site Map

whitspace and javascript issue?

Newbie
 
Join Date: Oct 2008
Posts: 2
#1: Oct 26 '08
Hi,

I am using xml to bind all the files that is present in a directory to a tree control. While doing so, if there is a file that has two blank spaces like........"Te st.txt". When i try to get the name of the text using javascript it's returning the value as "Te st.txt" instead of "Te st.txt".

i will checking for a list of extensions to download using javascript and then only i will pass those filename to another page to download. While passing it to another page, i will encode it with encodeURIcomponent function in javascript.

I have tried using &#160, it works perfectly and the text show correctly as "Te st.txt". but when i try using the encodeURIcomponent, and passing it to another page, i am getting a junk value instead of whitespaces.

Can someone tell me on how to go about it?.

Thanks,
S.Rajagopalan.



Reply