0

How do I retrieve data from MSSQL Server using Javascript? I am used to doing things in PHP, but I want to have an interactive form which is able to display Sales Tax after user types in his zip code.

My query is similar to: "select top z.rate from zipcodes z where z.zipcode = $zipcode"

Edited by agrarian: n/a

1
Contributor
1
Reply
2
Views
7 Years
Discussion Span
Last Post by agrarian
0

How do I retrieve data from MSSQL Server using Javascript? I am used to doing things in PHP, but I want to have an interactive form which is able to display Sales Tax after user types in his zip code.

My query is similar to: "select top z.rate from zipcodes z where z.zipcode = $zipcode"

I've got the data in a JSON object now. So how do I get the value out of it using Javascript?

For example, I have a change event on the zip code input tag, and now I want to reference the JSON object at a given URL, eg,mydata.php.

My JSON object that is returned by the mydata.php script is:

var salesTaxJSON = { 
"zipcodes" : [ { "Zip" : 19044, "City" : "HORSHAM", "County" : "MONTGOMERY", "State" : "PA", "CombinedTax" : 0.06}]};
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.