GeeCON Prague 2014*
The moose likes Struts and the fly likes Are there any javascript thing in struts aside from client side validation? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Are there any javascript thing in struts aside from client side validation?" Watch "Are there any javascript thing in struts aside from client side validation?" New topic
Author

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

Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 746
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?


SCJP 1.5
http://devpinoy.org/blogs/lamia/ - http://everypesocounts.com/
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
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"):


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Are there any javascript thing in struts aside from client side validation?