views:

245

answers:

2

Using a jQuery dialog, on clicking OK I call $.post( "save.asp", { id: 1, value: "abcxyz" } ); to pass the values to my ASP classic file that will update the database. I don't need a return value (unless it fails).

I'm a relative noob to jQuery, so I'm assuming I'm using JSON to pass the values to the ASP file. I just don't know what to do with them in ASP (using VBScript). I've seen things like ASP Extreme, but I'm not clear on how to use them. I've tried referencing values via the Request collection, but no luck. All I want to do is take the values passed, parse them out, then save them to the database.

Sorry if this is a duplicate, but this just isn't clicking for me.

+1  A: 

jQuery will default to sending the data as regular form parameters, not JSON.

lambacck
+3  A: 

Your are using associative arrays (as they are called in javascript in PHP, Object Literal Notation in javascript), but since you use them as the data to the post method they should get treated like normal form submits..

so in the asp side

pId = request.form("id")
pValue = request.form("value")
Gaby
*as they are called in php*. It is called Object Literal Notation in JavaScript ;)
Doug Neiner
@doug, i stand corrected :)
Gaby
`.Form` is what I was missing. Thanks.
Michael Itzoe