ryansy
1
These two onclick functions do not clear values that are in Bootstrap 4 inputs
buttonClearCustomer.onclick=function(){
$('#inputCustomer').value('');
$('#inputContract').value('');
ClearCustomerAndContractVars();
}
buttonClearContract.onclick=function(){
$('#inputContract').value('');
contract_id = '';
contract_name = '';
}
I also tried this version
$('#inputCustomer').value='';
$('#inputContract').value='';
Any thoughts?
ryansy
3
Thanks, that does not work either.
Use .val() vs .value().
For example:
$(’#inputCustomer’).val(’’);
ryansy
5
That worked. But, I am confused by .value would not worked as documented in the AS controls doccs for a BS input?
The .value in AS refers to the value of the input field. In the example, we’re using jquery and as such there is no .value() method.
In AS (Appstudio) you would the syntax would be youObject.value will give you the string value of yourObject.
ghenne
8
inputCustomer.value=""
should do the job. If it doesn’t, the issue is something else. Try creating a simple project with just an inputCustomer control and testing that.
Anything in the Console?