The point is, that full JS looks like as such:
Code:
function price() {
var frm=document.dsd_form;
var a=frm.conPrice;
var b=frm.OverP;
var max = <?php echo json_encode($max); ?>;
var min = <?php echo json_encode($min);?>;
var price = <?php echo json_encode($price);?>;
for (counter=(min.length / 2); counter<(min.length + 1); counter++){
if(a.value >= min[counter]){
if(a.value <= max[counter]){
b.value=min[counter]+ " " + max[counter] + " " + price[counter];
}
else{b.value = 0;}
}
}
}
so, writing a number into conPrice input field, I want OverP field to change its value to a price following a logical statement.