Demonstrates a custom popup dialog and reseting a form on successful AJAX request.
If the form is successful it is reset. If it fails it is not. The form will fail 50% of the time