I am trying to create a Javascript template with tables and I want to replace the values with JSON data. But I am having a hard time replacing the template data with JSON. maybe I am confusing you but http://jsfiddle.net/k6pJz/ is where I am. All your help is highly appreciated.
Share
Fixed: http://jsfiddle.net/k6pJz/10/
This code had multiple syntax errors, and malformed JSON. And would still not have worked afte that. To name a few:
foo.innerHTML; .replace('a', 'b')/character..dataelement.Lastly, you may want to look into some templating libraries like the one built into jQuery or Mustache. Thats only two but there are tons, and they make your life much easier.