This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Call a Servlet but open it in a new window?  RSS feed

 
Brian Swingle
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I want to submit this form that calls a servlet but is there a way in html to force the servlet to open in a new window. It's probubly something simple i just dont know what it is. Thanks for all the help.
Brian
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By the use of target attribute in your form element or your a element:
<form METHOD="post" ACTION="your_servlet" TARGET="_blank">
<a href="your_servlet" TARGET="_blank">x</a>
You can give the Target a specific name and that window will keep getting reused or use the key _blank which always gives you a new window.
Other keys:
_parent
_self (Default if not given)
_top (Mainly used when you reference a anchor name in the page)
 
Brian Swingle
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, i new it was something simple. I didn't realize you could use that Target="_blank" attribute in a <form> tag.
Thanks,
Brian
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!