However there is some limitation to use Ajax to post a multi-part form. Although it might be possible, it is definitely not a clean implementation, and it is not supported by most of the browsers. In this case, iFrame may be a good alternative. The inner frame page will handle the multi-part form and the parent page will have the similar Ajax effect. That being said, iFrame’s biggest problem is that its width and height are set right from the start and it won’t adjust based on the source content. This will leave the ugly scrolling bars around the iFrame, or some content will be hidden if the scroll bar is disabled. For most of the pages, the width is somewhat less of a problem but the height is harder to control and set correctly.
Using jQuery, we can add the following code in the iframe source content:
var theFrame = $(“#iFrameToAdjust”, parent.document.body);
theFrame.height($(document.body).height() + 30);
From my testing result, this works in FF2, IE7 and Opera 9.25, not in Safari 3.1 for Windows though.