Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Galaxie Atlboy
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64633
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.
 
Galaxie Atlboy
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks ..... it was my first post.....
 
Shailesh Narkhede
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic