My Function:
function Get() {
debugger
var za = document.getElementById(contnm + 'hdcap').value;
var nums = document.getElementById(contnm + 'TxtQUANTITY').value;
if (nums > za)
{
alert('Quantity should be less than Capacity.');
document.getElementById(contnm + 'TxtQUANTITY').value = '';
}
}
My hdcap value is 100000, means za = 100000. & TxtQUANTITY value is 3000, means nums = 3000.
if i take TxtQUANTITY = 1000 then its working properly but if i take TxtQUANTITY = 2000 or 3000 or 5000 or 4000 or 20000 or 30000 then it showing alert.
NOTE:
if i put directly values like if (3000 > 100000) then its working but in js with variable its not working.