- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › How to pull dynamic data from a database with JQuery and display it in a webpage table?
Hi,
How do I pull dynamic data from a database with JQuery and display it in a webpage table?
Can anyone help? I know some html and css but I have be spending a long time trying to figure out how to do this with jquery so I can have featured product table that updates when product details change. Can someone point me in the right direction? This is a Volusion site.
You can’t use jQuery to fetch database information. You can only iterate over the information already provided by the application. In many cases you will be dealing with JSON or JSONP.
Can you give me a simple example? I have read about JSON but I am not sure where to start. I keep seeing JSON AND PHP explanations on the net but Volusion has ASP.
I don’t know ASP, but [the first few results here](https://www.google.com/search?q=json+with+asp&oq=json+with+asp) look promising.
[JSON](http://json.org) itself is nothing more than a text format for data exchange – just a way to serialize things to pass them back and forth (e.g., from server-side to client-side applications). So, if your SQL query returned a product named “widget” that cost $25, you might have JSON like so:
{“product”:”widget”,”price”:25}
… and, once you sent it to your javascript application, you could do something like
var product = JSON.parse( ‘{“product”:”widget”,”price”:25}’ );
which would give you a javascript object you could use to write a new item description, etc.. If you want something ready to integrate with Volusion, you might have to do a bit of searching (or hire an ASP dev).