469,599 Members | 2,617 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,599 developers. It's quick & easy.

Problems with sending an encoded url

Hello Gurus
thankyou for your help in advance :)......heres my problem

var vAppPath=(my file)
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlHttp.open("POST",vAppPath,false);
xmlHttp.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded");
xmlHttp.send("text=" +
escape(document.getElementById("tledit").value));

were document.getElementById("tledit").value = assccéccèccÉcc
d'abonnccàcc ccÀcc ccboccîccte

now in my file.....i do try to read the text
text = request("text")

the text = asscccccccc d'abonncccc cccc ccboccccte

the french characters are stripped out. I think its the escape
functions thats doing this.
is there a way to over come this?

Aug 31 '06 #1
3 1695

<Ka************@gmail.comwrote in message
>news:11**********************@m79g2000cwm.googleg roups.com...
Hello Gurus
thankyou for your help in advance :)......heres my problem

var vAppPath=(my file)
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlHttp.open("POST",vAppPath,false);
xmlHttp.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded");
xmlHttp.send("text=" +
escape(document.getElementById("tledit").value) );

were document.getElementById("tledit").value = assccéccèccÉcc
d'abonnccàcc ccÀcc ccboccîccte

now in my file.....i do try to read the text
text = request("text")

the text = asscccccccc d'abonncccc cccc ccboccccte

the french characters are stripped out. I think its the escape
functions thats doing this.
is there a way to over come this?
Don't use the escape function use encodeURIComponent instead.
Aug 31 '06 #2

"Anthony Jones" <An*@yadayadayada.comwrote in message
news:Ok**************@TK2MSFTNGP03.phx.gbl...
>
<Ka************@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
Hello Gurus
thankyou for your help in advance :)......heres my problem

var vAppPath=(my file)
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlHttp.open("POST",vAppPath,false);
xmlHttp.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded");
xmlHttp.send("text=" +
escape(document.getElementById("tledit").value));

were document.getElementById("tledit").value = assccéccèccÉcc
d'abonnccàcc ccÀcc ccboccîccte

now in my file.....i do try to read the text
text = request("text")

the text = asscccccccc d'abonncccc cccc ccboccccte

the french characters are stripped out. I think its the escape
functions thats doing this.
is there a way to over come this?

Don't use the escape function use encodeURIComponent instead.
An alternative worth considering is to post XML instead.

Change the client code:-

var vAppPath=(my file)
var domReq = new ActiveXObject("Microsoft.XMLDOM")
domReq.appendChild(domReq.createElement("text")).t ext =
document.getElementByID("tledit").value
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlHttp.open("POST",vAppPath,false);
xmlHttp.setRequestHeader("Content-Type","text/xml");
xmlHttp.send domReq
Now on the Server:-

Dim domReq: Set domReq = Server.CreateObject("MSXML2.DOMDocument.3.0")
domReq.async = false
domReq.load Request

text = domReq.documentElement.text

Aug 31 '06 #3
Thankyou every much Mr Jones :-D

the encodeURIComponent did the trick :)
Anthony Jones wrote:
"Anthony Jones" <An*@yadayadayada.comwrote in message
news:Ok**************@TK2MSFTNGP03.phx.gbl...

<Ka************@gmail.comwrote in message
>news:11**********************@m79g2000cwm.googleg roups.com...
>Hello Gurus
>thankyou for your help in advance :)......heres my problem
>
>var vAppPath=(my file)
>xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
>xmlHttp.open("POST",vAppPath,false);
>xmlHttp.setRequestHeader("Content-Type",
>"application/x-www-form-urlencoded");
>xmlHttp.send("text=" +
>escape(document.getElementById("tledit").value) );
>
>were document.getElementById("tledit").value = assccéccèccÉcc
>d'abonnccàcc ccÀcc ccboccîccte
>
>now in my file.....i do try to read the text
>text = request("text")
>
>the text = asscccccccc d'abonncccc cccc ccboccccte
>
>the french characters are stripped out. I think its the escape
>functions thats doing this.
>is there a way to over come this?
Don't use the escape function use encodeURIComponent instead.

An alternative worth considering is to post XML instead.

Change the client code:-

var vAppPath=(my file)
var domReq = new ActiveXObject("Microsoft.XMLDOM")
domReq.appendChild(domReq.createElement("text")).t ext =
document.getElementByID("tledit").value
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlHttp.open("POST",vAppPath,false);
xmlHttp.setRequestHeader("Content-Type","text/xml");
xmlHttp.send domReq
Now on the Server:-

Dim domReq: Set domReq = Server.CreateObject("MSXML2.DOMDocument.3.0")
domReq.async = false
domReq.load Request

text = domReq.documentElement.text
Sep 1 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

15 posts views Thread by Florian Lindner | last post: by
2 posts views Thread by Carl Gilbert | last post: by
7 posts views Thread by kingski | last post: by
6 posts views Thread by ThunderMusic | last post: by
10 posts views Thread by amygdala | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.