Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by samalairbien on May 14, 2009 02:02
open dhtmlx forum
[dhtmlxAjax.postSync] How to transmit parameters with accents?

Hello,

I would like to post with dhtmlxAjax.postSync() parameters containing accents (acute accent or grave accent). But, when my action receive the request, characters with accents are just deleted. How could I transmit these characters?

Thanks for your help
Answer posted by Alex (support) on May 14, 2009 03:02

Hello, 

You can try to use  encodeURIComponent() JS method to encode values of parameters.

Answer posted by samalairbien on May 14, 2009 04:33
Thanks Alex . I will try this function. Is there an other function to restore the accents from de string in my action?
Answer posted by samalairbien on May 14, 2009 04:38
Actually, I would like to encode my accents with encodeURIComponent() in Javascript. But my parameters are received by a Java class. So I would like to restore my accents thanks to a java function. But which function?.. an idea?
Answer posted on May 14, 2009 05:06

Try to use attached file instead of original dhtmlxcommon.js. Possibly it'll solve the problem.

Attachments (1)
Answer posted by samalairbien on May 14, 2009 05:22
Actually, the java class decode itself the encoded string simply using encodeURIComponent when I post my parameters. That's nice!! Thanks for your help.