If you want to submit a form through ajax, take a look to this wiki for an alternative and working approach.