javascript - Submit form in popup window does not work in Firefox and IE8/IE9 -
i using simple way submit form in pop window (which need done vanilla js)
<form onsubmit="checkoutproducts.onsubmitform(this);" action="/product/" method="post" name="paymentform" id="paymentform">
and js code
var checkoutproducts = checkoutproducts || { onsubmitform: function(form) { window.open('', 'formpopup','width=400,height=400,resizeable,scrollbars'); form.target = 'formpopup'; document.paymentform.submit(); } }
it working fine in chrome, reason not working in firefox , ie, opens pop blank page, doing wrong?
very simple use tested component works in major browsers in same way.
$( "#dialog" ).dialog({ autoopen: false }); $( "#opener" ).click(function() { $( "#dialog" ).dialog( "open" ); });
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> <script src="//code.jquery.com/jquery-1.10.2.js"></script> <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script> <button id="opener">open dialog</button> <div id="dialog" title="dialog title">i'm dialog</div>
Comments
Post a Comment