This is why you must always sanity-check …

This is why you must always sanity-check your inputs: a jQuery tutorial on the official site uses an AJAX rating system as an example, and links to a functioning implementation. After clicking one of the numbers to rate on a scale of 1 to 5, the page transforms via the magic of AJAX in to (at the time of writing):

This example demonstrate basic use of AJAX. Click one of the links below to rate. The number of rating and the average rating will be returned from the serverside script and displayed.
Thanks for rating, current average: 1.19329688816E+126, number of votes: 8379

Emphasis mine. A little napkin calculation that assumes the average normal result is a rating of 3 gives that this could all be caused by a single rating of 10 to the 30th power.

High praise indeed.

Advertisements