In order to subtract an integer from a value which is fetched using $(#id).val() I have tried:
$("#hid_count").val() = $("#hid_count").val() - 1;
and:
count = $("#hid_count").val();
Here hid_count is a hidden field on the page. However, both of these are not working. An error is coming on the page. Can anybody explain why this is?
Since you are reading a string, you have to make a
parseIntbefore arithmetic operation