| Author |
Urgent: Submitting a form in a page and using it's values in an already open page
|
Abhinav Abhinav
Greenhorn
Joined: Jan 11, 2005
Posts: 1
|
|
Hi, I'm facing a problem in one of the apps I am developing. I've a Struts JSP which accepts some information from the user in a ActionForm. On this page is a button, clicking which causes another window to pop up. This windows contains another Struts JSP which is used to make the user upload a file. This JSP used the same ActionForm as the previous one. Once the user uploads the file and presses a button, "Done", the form is submitted and the window is closed. Meanwhile the other window remains open. The problem is that, both the JSPs have the same Action associated with form submission, and once the user clicks the "Done" button, the name of the uploaded file should come in a textbox of the first JSP. Kindly suggest/advise on how to accomplish this. Thanks in advance Abhinav
|
 |
Archana Annamaneni
Ranch Hand
Joined: Jan 29, 2003
Posts: 147
|
|
I think in your first JSP when user presses the button open it in the same window and after as soon as user press the Done button close window and in Action forward to the first JSP and there if you see file has been uploaded then display the name. I am not sure whether this solution suits your criteria
|
 |
Jitesh Sinha
Ranch Hand
Joined: Jun 19, 2004
Posts: 144
|
|
Your problem should be solved by using simple Javascript. Just need to refer the textbox window by parent and on press of 'Done' button on the pop-up you should have js code like this : parent.document.formname.textfield.value=this.form.popupwindowtextbox.value ; Let me know if this solution does not work for you.
|
 |
 |
|
|
subject: Urgent: Submitting a form in a page and using it's values in an already open page
|
|
|