Window.open And Sending Form Data Not Working
I'm trying to open new window and send form data with javascript and jquery-1.8.3. But, It's not woriking. This is source code. Print this&l
Solution 1:
Are you faking an ajax call ;-)
Better you do something like this:
<ahref="#"onclick="printPage()">Print this</a><scripttype="text/javascript"src="/common/js/jquery-1.8.3.min.js"></script><scripttype="text/javascript">functionprintPage(){
$.post('/common/print.jsp', {view:$("#ctn").html()}).success(function(response){
var oWindow = window.open('', "printWindow", "width=700px,height=800px");
oWindow.document.write(response);
});
}
</script>
Post a Comment for "Window.open And Sending Form Data Not Working"