$('#exporttoword').click(function() {
alert("exporttoword");
document.forms[0].buttonName.value="exporttoword";
document.forms[0].hdncreatePage.value="3";
var ifi=0;
var container = document.getElementById('mainAction');
alert('container='+container);
container.innerHTML+='<iframe id="ifi'+ ifi +'" height="55" frameborder="1" width="55" name="ifi'+ifi+'"></iframe>';
document.forms[0].target = 'ifi' + ifi ;
document.forms[0].action="MyAction";
document.forms[0].submit();
});
<input type="button" id="exporttoword" class="submit_btn_base" value="Export to Word">
Please see the question again . What changes I need to do so that Ajax form submit can pop up a download prompt ?