Populate a list with Json data


#1

I can make an Ajax call and retrieve some customer data from a MYSQL database.

the records have the following structure.

[{“custID”:“1291”,“companyType”:“Client”,“companyName”:“Shaun XXX”,“Address1”:“12 xxxxx road”,“Address2”:"",“Address3”:"",“Town”:“AUL”,“Post_Code”:"",“Telephone”:"",“Mobile”:“0700001006”,“Fax_No”:"",“Email”:"",“Web_Site”:"",“Notes”:"",“Country”:"",“County”:"",“Cust_Ref”:"",“Start_Date”:null,“Del_Address1”:"",“Del_Address2”:"",“Del_Address3”:"",“Del_Town”:"",“Del_Post_Code”:"",“Del_Telephone”:"",“Del_Notes”:null,“Franchise_Start”:null,“Franchisee_Fee”:null,“Franchisee_Expire”:null,“Franchisee_0870”:"",“Client_Licence”:null,“Marketing”:"",“Belongs”:"",“Site_User”:"",“Site_Password”:"",“Client_Password”:"",“Belongs_Number”:null,“Client_Type”:"",“Del_County”:"",“Del_Company”:"",“Nominal”:"",“Login_ID”:"",“On_Stop”:“N”,“Del_Country”:"",“visible”:“1”} ]

  1. As a starting exercise I would like to show some data in a mobile list as per:

http://demos.jquerymobile.com/1.2.1/docs/lists/lists-nested.html

So the field ‘companyName’ is shown as the bold text then the other text is the address fields joined together.

  1. The next thing would to be able to click on the list and goto another form that shows all the data using the ‘custID’ field.

  2. Whilst testing in the desktop browser the Ajax calls fail. Is there a way around this so I can test quickly ( without having to create a mobile app etc etc.

Cheers

Steve Warby’ field


#2

Did you see the docs for the List control?

http://wiki.nsbasic.com/List

They should help with a number of aspects of your question.

If you want people to help with your Ajax question, it would help to say what error you are getting.