• 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

Are there any javascript thing in struts aside from client side validation?

 
Ranch Hand
Posts: 751
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So I was wondering if I could open a new window in struts



I didn't want to code my javascript anymore since I used struts. I find them so untidy when I mix it up with my jsp(html and struts tags). Do you guys have any elegant solution with this?
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are only 2 ways I know of to open a new window from a page:

1- Specify a target="" attribute on either a link or a form. This will open up a new window as long as the target name is different from the target name used when the current page was displayed. The disadvantage of this method is that you have no control over the size or position of the new window.

2- Use the javaScript window.open() method. With this method, you do have control over the size and position of the window, as well as other features, such as whether it is resizable. You can call a struts action from this command also, as in: window.open("/myAction.do"):
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic