0

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
  • You can, of course, use JScript in classic ASP. You need not resort to VBScript. Commented Mar 26, 2012 at 18:14

2 Answers 2

3

You 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")
Sign up to request clarification or add additional context in comments.

2 Comments

as they are called in php. It is called Object Literal Notation in JavaScript ;)
.Form is what I was missing. Thanks.
1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.