I look a lot true the net and I couldn’t find anything about in how to get a value of a input text, but only if the element has not zero on it, and noted, that I am talking about a interactive application the gets data back and forwards servers true ajax.
What I think is the best solution to fix this small issue is:
- Get the value of all elements to be checked.
- Check if it is a int:
if (Math.floor(input) == input && $.isNumeric(input))
- Pass it to server to fetch the the value that corresponds to the request.
- After that put the json response from the API in a for loop and a while loop to put content back to site.