String with URL encoding

Hi,
I got the problem that a have to convert a string in a string with URL encoding. I found a javascript that does that well. How could I use that in xojo?

function encode() { var obj = document.getElementById('dencoder'); var unencoded = obj.value; obj.value = encodeURIComponent(unencoded).replace(/'/g,"%27").replace(/"/g,"%22"); } Jens

Look at the LR for EncodeURLComponent and DecodeURLComponent.

[quote=194993:@Jens Holloch]Hi,
I got the problem that a have to convert a string in a string with URL encoding. I found a javascript that does that well. How could I use that in xojo?

function encode() { var obj = document.getElementById('dencoder'); var unencoded = obj.value; obj.value = encodeURIComponent(unencoded).replace(/'/g,"%27").replace(/"/g,"%22"); } Jens[/quote] You could use a WebControlWrapper. See WebSDK next to the Xojo executable for more. But since Xojo provides a native method with DecodeURLComponent, why don't you use that. It is way easier.