catching form submission

catching form submission

Perhaps I'm missing something obvious, as I'm pretty new to jQuery. But I have a button sitting in my footer that submits a form via POST. I'd like to display the results of that form as a dialog rather than loading a new page.

I assumed I could just use $('#theform').bind('submit', f) to add a listener to the form submit event and stop it to do my own thing. But it doesn't seem to work. I've tried calling bind() both before and after loading the jquery-mobile code, with no luck.

Ideally I could just stick data-rel="dialog" on the form itself, and have it do the rest but that doesn't seem like an option.




    • Topic Participants

    • mike