I want to compare the two input values, just try in javascript, but it's not working fine. I'm using the following code
function check_closing()
{
var opening = $('#opening').val();
var closing = $('#closing').val();
if(opening > closing)
{
alert('Opening is greater than Closing. Please enter the correct value');
$('#closing').val('');
}
}
if the opening value input = 8541, closing value like = 8241 it's work fine, but if the closing is 954 it's not working. Please help.
Thanks in advance.