I have this dropdown which have options if vehicle is new or used.
A manual subscription in your view model is a good way to handle something like this. The subscription might look like:
this.VehicleType.subscribe(function(newValue) {
if (newValue === "New") {
this.Mileage(0);
}
}, this);
Here is a sample using it: http://jsfiddle.net/rniemeyer/h4cKC/
The HTML:
The JS:
var ViewModel = function() {
this.VehicleType = ko.observable();
this.Mileage = ko.observable();
this.VehicleType.subscribe(function(newValue) {
if (newValue === "New") {
this.Mileage(0);
}
}, this);
};
ko.applyBindings(new ViewModel());