aspose file tools
The moose likes Struts and the fly likes On clicking submit button , a new window should open up. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "On clicking submit button , a new window should open up." Watch "On clicking submit button , a new window should open up." New topic
Author

On clicking submit button , a new window should open up.

Galaxie Atlboy
Greenhorn

Joined: Jun 01, 2009
Posts: 2
I have 5 different submit buttons in my JSP page each linked to a different Action method in Java class. I am using Struts 2 frame work. After filling the JSP form fields, when one of the submit button is clicked a new window should pop- up which contains info from the earlier JSP which was filled.

Example. If 1.jsp has Name, Address, Phone , Age, Type of Occupation etc fields. When I click on one of the submit buttons, a new window say 2.jsp should pop-up , which contains Name, Address and Phone filled in 1.jsp. It is kind of a preview page to see how the final page will look after saving. Also the info filled in 2.jsp should remain as it is , since if someone doesnt like its preview they can still change the info in 1.jsp

Can anyone help me?

Currently in my 1.jsp Ihave

<a target="_blank" href=<s:url value="myview" /><s:submit value="myview" title="myview" action="myview" />>
</a>




Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56205
    
  13

Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Galaxie Atlboy
Greenhorn

Joined: Jun 01, 2009
Posts: 2
Thanks ..... it was my first post.....
Shailesh Narkhede
Ranch Hand

Joined: Jul 10, 2008
Posts: 356
You can call one JS function on click of button(that is normal button not submit type) in that function submit form and after that you can use window.open() to open new window.

you can get help from THIS link


Thanks,
Shailesh
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: On clicking submit button , a new window should open up.
 
Similar Threads
history.back() not retaining changed values in previous page after window.open() call
How to submit a form like this, using struts?
How to update Session variable with Form Data ?
Reloading a parent window 1 after submit from window 2
Problem Refreshing Page-Struts