PDA

View Full Version : How to submit the window from another window through javascript



aquaries_s
Mar 7th, 2008, 02:27 AM
Hi,
I am having a page from where i let user upload .csv file ,
As user browses and select file to upload and clicks upload button , on click of this upload button a new jsp is opened up on the parent window but it's not a pop up e.g.

<a href="<%=request.getContextPath()%>/hierarchy/popUp.jsp" class="modalEffect" >
<button type="button" class="ctaPrimary" onclick="checkFileType(uploadfile.value,this.form);" ><span><span><span>Upload</span></span></span></button>
</a>

In this popup.jsp the user is displayed either a message or error with ok and cancel button, Now when user clicks ok button the popup.jsp should close and the parent window should get submitted and a progress bar should be displayed on parent window if time taken for it's submission is more.

mjlorbet
Mar 7th, 2008, 09:00 AM
onclick="window.opener.finishUpload();"


replace finishUpload with whatever function you need to call on your parent window to clean up.