jquery val
-
Hi,
I have a problem with one formula:
I have two buttons and one number field. I need that when I click in one button the number field is automatically populated with value of another calculated field, and the same with when I click the other button, but if the user want can populate number field manually.
I have inserted this script in one html field, but when I click in button don’t populate number field.
<script>
jQuery(document).on(‘click’, ‘[id*=”fieldname25_”]’, function(){
var bmin= jQuery(‘[id*=”fieldname41_”]’).val()*1;
jQuery(‘[id*=”fieldname27_”]’).val(bmin).change();
});
jQuery(document).on(‘click’, ‘[id*=”fieldname26_”]’, function(){
var bmax= jQuery(‘[id*=”fieldname42_”]’).val();
jQuery(‘[id*=”fieldname27_”]’).val(bmax).change();
});
</script>fieldname25 and fieldname26 are a button
fieldname41 and fieldmane42 are calculated fields
fieldname27 is a number fieldBest regards
- The topic ‘jquery val’ is closed to new replies.