Hello,
I would like to calculate in multi field.
I have two columns with seven rows
The textbox of the first row of the first column has the ID text320
The textbox of the first row of the second column has the ID text330
The textbox of the second row of the first column has the ID text321
The textbox of the second row of the second column has the ID text331, and so for the following rows.
When I write a number in the first column I would to have the result in the second column.
text330=text320*130
text331=text321*155 and so for the following rows.
I put this in LoadJavaScript in OnLoad for the first row.
Is someone able to help me, and show me for the two first rows. I think that I could understand for the following rows.
Thanks per advance
Jean-Claude
I would like to calculate in multi field.
I have two columns with seven rows
The textbox of the first row of the first column has the ID text320
The textbox of the first row of the second column has the ID text330
The textbox of the second row of the first column has the ID text321
The textbox of the second row of the second column has the ID text331, and so for the following rows.
When I write a number in the first column I would to have the result in the second column.
text330=text320*130
text331=text321*155 and so for the following rows.
I put this in LoadJavaScript in OnLoad for the first row.
window.addEvent('domready', function() {
$('text320').addEvent('change', calc);
});
function calc() {
var price = 130;
var quantity = $('text320').value;
if ( price > 0 && quantity > 0 ) {
$('text330').value = price * quantity;
}
}
Nothing happens.
Is someone able to help me, and show me for the two first rows. I think that I could understand for the following rows.
Thanks per advance
Jean-Claude