0 Replies Latest reply: Jun 11, 2012 1:49 AM by Phinehas1234 RSS

    URLDecode Error

    Phinehas1234 Community Member

      Hi,

       

      We encounter some errors on JavaScript and ColdFusion.navigate.

       

      We use

      ColdFusion.navigate('cfc/control.cfc?method=checkName&name='+encodeURIComponent(document.g etElementById('name').value),'addName,addName);

       

      In control.cfc, we use this statement to get the original name <cfset newName = URLDecode(name)>.

       

      However, it encounters error and cannot show the result. When I add  ?cfdebug to url, it cannot show me the error.

       

      For example, user inputs "A+C" (the encoded code is "A%2BC", URLDecode cannot return "A+C", it returns "A C".

       

      When if user inputs "A C" or some Chinese words, it runs correctly.

       

      Can anyone help me to solve the problem?