I have a table which has 7 cells. when the page is loaded I pre-populate those table cells which has an ahref and img in it.
I have made a php script also just gives me output as json for next / prev. 7 products.
I just want to know how to use that json data which has url for ahref and url for img picture to replace the content in cells with new data using jquery etc. ?
You can use [.parseJSON() to convert the JSON data string in to an actual object, and then depending on the structure of it, use [url="http://api.jquery.com/jQuery.each/"].each() to process each piece of data, where you can use jQuery to [url="http://api.jquery.com/jQuery/#jQuery2"]create your elements and then either [url="http://api.jquery.com/replaceWith/"].replaceWith() or [url="http://api.jquery.com/replaceAll/"].replaceAll()](http://api.jquery.com/jQuery.parseJSON/) command to replace the old contents with the newly updated.
This topic is now closed. New replies are no longer allowed.