<script type="text/javascript">
function OnChangeEventforpercentage() {
compareValues(document.getElementById('x'), document.getElementById('y'));
}
function OnChangeEventfordiscount() {
compareValues(document.getElementById('y'), document.getElementById('x'));
}
function compareValues(x, y) {
var value = x.value;
if (value == "") {
$(y).prop('readonly', false);
}
else if (value != "" ) {
$(y).prop('readonly', true);
}
}
</script>
function OnChangeEventforpercentage() {
compareValues(document.getElementById('x'), document.getElementById('y'));
}
function OnChangeEventfordiscount() {
compareValues(document.getElementById('y'), document.getElementById('x'));
}
function compareValues(x, y) {
var value = x.value;
if (value == "") {
$(y).prop('readonly', false);
}
else if (value != "" ) {
$(y).prop('readonly', true);
}
}
</script>
No comments:
Post a Comment