views:

26

answers:

1

I created some HTML code based on a javascript var. I want to update these HTML code when I update the source var. Because I have object reference in the HTML, I know which HTML section to update.

How do I accomplish such thing? Thank you.

A: 

Use jQuery to modify the DOM.

duffymo
How is it that this answer has not been upvoted 30 times by now? What has the world come to???
MooGoo
I did. But, I need to know which HTML code I generated by which variable. If I change the variable value, I shell know which HTML code to update.
Anyway, nvm, I think I will drop the dynamic databinding idea. If I insert/remove an obj in a source array. The array itself lacks onchanged notifications. I would have to make my own array, but, that would just be more confusing for the programer populating the array.