Thursday, 21 April 2016

How do I fill in multiple html elements with data from a JSON string?

Here is the code I'm working with:



 '



Insert title here












apiCredential
User Name
Password






Special thanks to the awesome team at GameSparks!







User Name


Coins


Exp


Leader Points


Hero Points










'


Obviously, I'm trying to fill in some html elements with data I get from a string. Problem is, when I use this function, it fills in the first element ONLY, and totally wipes the others from view. So it returns "testuser" for "UserName", and all of the other html elements disappear! I want it to display ALL of the data!

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...