December 2013
Intermediate to advanced
480 pages
14h 11m
English
The WinJS library does not support two-way data binding. Change notification is one-way. If you want to capture the contents of an HTML form then you need to do the work of retrieving the values of the form elements yourself.
The page in Listing 3.9 contains an HTML form for creating a new product. It has two INPUT elements for the product name and price (see Figure 3.7). The form uses a single data-win-bind attribute. The FORM element has a data-win-bind attribute that wires up a form submit handler.
FIGURE 3.7 Creating a new product
LISTING 3.9 Two-Way Data Binding (dataBindingTwoWay\dataBindingTwoWay.html) ...
Read now
Unlock full access