Magic Files
Posted: 2013-09-28 15:20
Hi,
I am using the following Code in Magic Files and works very well:
My problem is I cannot set elem.value = $('MaxQuantity') no matter what I try.
Any ideas how to set elem.value to be equal to Max Quantity?
Thanks
I am using the following Code in Magic Files and works very well:
Code: Select all
document.observe('dom:loaded', function() {
$('NetWeight').observe('change', function() {
if(isNaN($('NetWeight')) || $('NetWeight') > $('MaxQuantity') || $F('NetWeight') < 0){
alert('Error on Net Weight!');
var elem = document.getElementById("NetWeight");
elem.value = "1";
$('NetWeight').focus();
}
});
});
Any ideas how to set elem.value to be equal to Max Quantity?
Thanks