I have an input field in apex given below
<apex:inputField value="{!paymentDetails.Amount__c}" onChange="enableLppAmount(this)" required="true" />
Also I have a simple input box
<input type="number" id="lppAmount" disabled="true"/>
I have the following javascript
function enableLppAmount(input){
if(input.value.length > 0){
document.getElementById("lppAmount").disabled=false;
}
else {
document.getElementById("lppAmount").disabled=false;
}
}
Now When i enter any number in the apex input it is not enabling the html input. Basically the function is not being called. I want that when someone enters value in the apex input the simple input should be enabled and if no value then disabled. thanks for any help.