Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Frames and JSPs

Status
Not open for further replies.

avs

Programmer
Jun 25, 2001
1
US
Hi All,
Can somebody help ? The following is the situation and I need a solution to this problem. Thanks for your time.

I have frames.jsp which contains frame1.jsp & frame2.jsp. From frame2.jsp I call a servlet to create a Popup window. I want the popup window to close upon submission of the form and also want to refresh frame1.jsp with whatever data that was input in popup window.

I do this as follows:
Upon submission of popup.jsp I call a PopupServlet to obtain all 'form' parameters thru the 'request' object and update the database. I also take the request.dispatcher to forward to some x.jsp where in 'onLoad' method of the x.jsp I call a fuction that would close the popup. The reason I do this is because , as soon as I call the popupservlet, it takes me to a new browser and I do not want that. I also want to close the popup. It doesnt happen if I give 'window.close()' in a javascript function of the popup.jsp just after I trigger the form for submission by means of a servlet, because the handle of the popup gets lost here.

Now all is well until the data gets reflected in the database, and the close of popup happens in x.jsp. But I do not know how to call the reload of frame1.jsp inside x.jsp because the handle to that frame is not visible here.

Thanks,
avs
 
U want to capture the value of the popup.jsp in the frame1.jsp, right. See there is one simple way to do this is open the popup.jsp on the onload of the first.jsp and using java script u can fetch the value of it in this way

window.opener.document.formname.fieldname.value=document.formname.fieldname.value;)

Thanks & Regards
stylebhai



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top