aspose file tools*
The moose likes Struts and the fly likes Submitting from pop-up window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Submitting from pop-up window " Watch "Submitting from pop-up window " New topic
Author

Submitting from pop-up window

aslam parveez
Ranch Hand

Joined: Apr 25, 2006
Posts: 47
Hi,

I have a requirement where in once i click on a link in a jsp page i will have to show a form in a popup window. And once i submit the form the pop-up window needs to be closed. I'm able to do the same by using java script function window.open("URL of action for showing the form',window properties). I'm able to submit the form also.
However, my problem is when i have an error situation during my submit then i'll have to display the error message in the parent jsp after closing the pop-up window. I have declaratively handled the exception by giving the parent page as the input but when there is an exception my parent page is not refreshed and error message is not displayed. How do i achieve the same ? Any help will be greatly appreciated.
Shane W
Ranch Hand

Joined: Aug 31, 2007
Posts: 30
Normal handled exceptions can be caught and a message can be set in the request object ( or you can have it in bean ), and this message can be shown on JSP.Modify your parent JSP suitably to show the messages.Ensure that you clear the message evry time in the action to avoid an old message from popping up later.

Hope it helps.

Apple Man
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Submitting from pop-up window