February 26th, 2013, 02:01 AM
Integer versus strings
I've figured out that $price is a string, and though you cannot see the declaration of the array sellvalue it's an array of strings too. This means 750 is greater than 10,000.
var $price = $(this).find('input[name="price"]').val();
var $item = $(this).attr('which');
if(sellvalue[$item] > $price)
How do I make it treat $price and sellvalue[$item] as integers so that 750 is less than 10,000?
February 26th, 2013, 03:14 AM
February 26th, 2013, 03:53 AM
Awesome! Thank you Winters!
All my searches for something like pascal's strtoint were fruitless, I just didn't know what to search for.