Get value from AJAX using Javascript and ASP

Client-side Javascript can't query server-based databases for obvious reasons. Based on what you appear to be doing, I would suggest you code an ASP which performs the actual query using VBA / C# / whatever, and you can then parse the results in your client-side ajax call as normal.


URL encode _data and nbquestions variables. Request.QueryString("param1") will decode them for you.

JavaScript URLEncode:

escape(_data);

Also you can use Server.URLEncode() methods from VB script.