View Single Post
Old 10-07-2012, 07:49 PM   PM User | #3
Cyberpops
New to the CF scene

 
Join Date: Oct 2012
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Cyberpops is an unknown quantity at this point
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.
Cyberpops is offline   Reply With Quote