472,126 Members | 1,429 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,126 software developers and data experts.

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 1764

<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 leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.