Thanks everyone. I'll reply to several questions all at once here.
- It's ASP, not .NET. ( I know, I know.)
I tried the JavaScript decodeURI and found it doesn't decode the ASP
Server.URLEncode() well.
I know that jQuery wants to stay small, but it seems like adding php,
asp, .net decoders
: [jQuery] Re: Ajax: ASP returns JSON to client
Thanks everyone. I'll reply to several questions all at once here.
- It's ASP, not .NET. ( I know, I know.)
I tried the JavaScript decodeURI and found it doesn't decode the ASP
Server.URLEncode() well.
I know that jQuery wants to stay small
From: SamCKayak
In ASP, I am building a JSON object and escape the data using
Server.URLEncode(strParmChoices)
It seems this encodes blanks as a plus sign +.
Back in JavaScript, it looks like unescape(+) leaves the
plus as a plus. I've band-aided the problem using
In ASP, I am building a JSON object and escape the data using
Server.URLEncode(strParmChoices)
It seems this encodes blanks as a plus sign +.
Back in JavaScript, it looks like unescape(+) leaves the
plus as a plus. I've band-aided the problem using...
Use decodeURI()
SamCKayak wrote on 5/21/2007 3:44 PM:
In ASP, I am building a JSON object and escape the data using
Server.URLEncode(strParmChoices)
It seems this encodes blanks as a plus sign +.
Back in JavaScript, it looks like unescape(+) leaves the plus as a
plus. I've band-aided the problem using
Michael Geary wrote on 5/21/2007 4:13 PM:
How would that help? decodeURI() or decodeURIComponent() don't change plus
to space.
Ah, so you're right. My bad for assuming a function to decode a URL would
actually decode it according to the RFC.
- Bil
Sam,
I'm hoping that by ASP you mean ASP.NET, because there is an easy solution
for this. The problem lies in the fact that the Server.URLEncode class is
NOT javascript-friendly.
I solved this be accessing the MS javascript engine from within .NET, with:
7 matches
Mail list logo