I did a little Json and some XML using prototype last year.  Now I
have jQuery and need to pass about 4 string parameters to the server,
query a database, and return about 4 string parameters.

My current method to post the get is:

$.get("../survey/postsurveytodb.asp", {
                surveyid:       strSurveyId,
                question:       strQuestion,
                type:   strChoiceType,
                choices:        strParmChoices
        },
        function(data){ /* The callback on Ajax Request Complete */
                alert("Data Loaded: " + data);
        }
);

I am not familiar with any built-in Json support jQuery may have, so
the above method of passing parameters to the server seemed to be
efficent for this request.  ASP can pick apart the query string
neatly.

Json comes to mind when contemplating decoding the return data.  Which
would be easier?  Encoding the data as a query string or as Json.

Suggestions or comments?

Sam

Reply via email to