Validation

In my controller, I have a function defined which performs authorization
on a credit card. It will return either “Success” or “Failure”
depending
on the results.

In my form, I would like to have the submit button cause the check to be
performed and the page would sit there while it was processing. After
the
processing, on a “Success”, it would forward on to the confirmation page
and on a “Failure”, it would display an error message in a div.

I have used observe_field before to call methods in a controller to
check
availability of a login name, but I’m not sure how I would do what I
described above. Any help out there?

Thanks,
David