Linked Questions
20 questions linked to/from How to Implement DOM Data Binding in JavaScript
14 votes
3 answers
4k views
Plain Javascript bidirectional Data binding
out of curiosity and to increase my knowledge, i wanted to implement some kind of two way data binding between dom elements and javascript variables. I was lucky enough to find an excellent answer to ...
-1 votes
5 answers
2k views
How to multiple (a*b) two input text value and show it Dynamicly with text change in javascript?
i want to show the money that customer must pay and my inputs are like this : <input type="text" class="form-control" placeholder="cost " id="txt" name="credit"> <input type="text" class="...
1 vote
1 answer
5k views
JavaScript Save Table Rows added by User
I am making an Electron app that has tables, the user can add a table and change the content of the fields, but I want the input to be saved, and only if the user entered anything into them. How ...
1 vote
2 answers
3k views
How to keep html DOM elements synchronized with the associated javascript object? Best practices
Lets say that I've the following structure: <textarea id="content"></textarea> <select id="sel"> <option value="1">value1</option> <option value="2">value2&...
3 votes
1 answer
2k views
How is data binding implemented in SAPUI5?
In this awesome question: How to Implement DOM Data Binding in JavaScript Many data binding implementation details is well explained. There are also many exploring blogs about dirty checking in ...
8 votes
2 answers
839 views
Controls Webpage with Knockout: Visible changes not saved
Trying to edit a website with Excel VBA. The edits appear to work, but when I use the save button, nothing is saved. Why isn't updated data, which is visible on the screen, being saved? This code ...
2 votes
1 answer
2k views
Bind HTML element to Javascript object and store object in array - Update object with input value from child element
In vanilla JavaScript how can I bind an element to an object so that if a child element of the object has a value I can update the object with it? Need to be compatible with IE10+ and all other ...
0 votes
2 answers
496 views
How to bind a object to update the value using plain js?
I have a object with name value. Is it possible to bind that value to html element? - like angularjs if so what is the correct way? or is it not possible? here is my demo : var ob = {}; ob....
1 vote
2 answers
138 views
Value of `this` in a function called from an event handler callback?
I have commented the relevant code. I found through trial and error that I have to use bind in both the event handler and the named callback in order for things to work correctly. I did not find ...
1 vote
3 answers
230 views
Javascript producing a value into a form textbox on selection
Trying to figure out how I can produce text dynamically in a text box of a form using javascript. I want to select a type of event from a dropdown list which I have made and on that selection a value ...
1 vote
1 answer
351 views
Dynamically Change variable name
var x = []; $('input').click(function(){ $(this.value).push('Hello'); //x.push('Hello'); alert(x) //Expected Result: 'Hello' }) <script src="https://ajax.googleapis.com/ajax/libs/jquery/...
0 votes
1 answer
364 views
Plain Javascript Inline Edit & Save Definition List
I'm trying to achieve the following: Initial view is a simple definition list Clicking on the Edit button converts to input fields and shows Save and Cancel buttons Clicking the Save button will save ...
0 votes
1 answer
218 views
How to modify a large number of elements in DOM without sacrificing usability?
I have a list with quite a few elements (each of them is a nested div). Each element has a custom onclick handler. JS updates the list several times per second, this may result in: adding or ...
0 votes
0 answers
218 views
Modify callback to bind a DOM element with it in JavaScript
I am trying to attach a DOM element with a callback in JavaScript. Basically, the following is what I want: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> ...
1 vote
1 answer
175 views
Where does data binding belong in a single page application (JS and HTML)
I'm trying to do my own data binding code, mostly as a learning experience, and so I know exactly what is going on. Where should the relevant details for data binding be specified? I have seen two ...