This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
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: 60773
    
  65

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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by 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: 368
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: On clicking submit button , a new window should open up.
 
Similar Threads
How to submit a form like this, using struts?
How to update Session variable with Form Data ?
history.back() not retaining changed values in previous page after window.open() call
Reloading a parent window 1 after submit from window 2
Problem Refreshing Page-Struts