submit form from dialog using ajax

submit form from dialog using ajax


hi all,
i'm having a bit of trouble figuring out how actions get applied to
objects on pages. basically I want to load a dialog window with
"remote content" (another file) which is a form. This form will then
be submitted within the dialog window and the result will be displayed
inside the dialog window.
Do I need to use a .ajax call to submit the form, or does the content
within the dialog just work automatically itself?
Also, if I use "local content" - e.g. I make a div containing a form,
and make the div a dialog, how would I form an ajax call to submit the
form content to another file, and get a respone from the file?
I've tried to understand the documentation, but my heads pickled with
it!