[jQuery] Re: Ajax: ASP returns JSON to client

2007-05-22 Thread SamCKayak
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

2007-05-22 Thread Jeffrey Kretz
: [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

[jQuery] Re: Ajax: ASP returns JSON to client

2007-05-21 Thread Michael Geary
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

[jQuery] Re: Ajax: ASP returns JSON to client

2007-05-21 Thread Michael Geary
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()

[jQuery] Re: Ajax: ASP returns JSON to client

2007-05-21 Thread Bil Corry
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

[jQuery] Re: Ajax: ASP returns JSON to client

2007-05-21 Thread Bil Corry
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

[jQuery] Re: Ajax: ASP returns JSON to client

2007-05-21 Thread Jeffrey Kretz
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: