• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Call a Servlet but open it in a new window?

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic