Form Plugin - ajax post with response
I need to post a sequence of pages to an iframe, some GETs and some POSTS. But it is critical that I only continue to the next one when the previous is completed. For my GETs I was using simple javascript and depending on the onload parameter of iframes to tell me when the page is loaded. the code looks like this...
$("#myDiv").append('<iframe id="myOpt" onload="frameControl()">');
$("#myOpt").attr( "src", myurl );
after each one, the frameControl function is called that increments the counter and loads the next one.
the complication comes with POST. Can someone show me how I would write the jquery code that creates a form, sets a couple hidden variables and then posts that form to the iframe? And can I use the success parameter (in options) to detect whether the page was fully loaded, or only when the form was submitted? Note that I realyl don't want to create a form on the page except for the div that takes the iframe append. I'd like this to all stay in js.
options..
success:frameControl()?
Thanks for any advice/help.