KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have this dropdown which have options if vehicle is new or used. <select name="VehicleType" id="vehicleTypeDropdown" data-bind="value: VehicleType"> <option value="New" selected="selected">Nuevo</option> <option value="Used">Usado</option> </select> ` And this input: <input type="text" name="Mileage" data-bind="disable: VehicleType() === 'New',value: Mileage" class="input-large"> ` If the value in the dropdown selected is New the input must be disabled, and if used the input should be enabled, but if I enter a value the observable will grab this value and if I change the dropdown value to new the observable must become zero.
Tags (comma-separated)
Save Edits
Cancel