Reputation: 5766
A popup window is opened using window.popup Is it possible send post data to the popup page? I am working in tomcat + jsp
Upvotes: 0
Views: 3457
Reputation: 140050
You can use the target
attribute of <form>
to POST data to a popup. If you don't need to open the window explicitly using window.open
, you can simply use an arbitrary window name as your target and the browser should POST the data to a new window. Whether a new popup opens or not depends on your browser. If you need to explicitly open the popup with window.open
, I think you can still target that window with the target attribute once the popup is open.
var win = window.open("placeholder.htm", "mypopup"); // optional step
<form action="doit.jsp" method="post" target="mypopup">
Upvotes: 2