[struts[ how to open a new window?

Hi guys,

I wonder how can I open a new window with size X,Y from an Action (struts).

in other words, I have a table with list of items. when the user clicks one of items (car model) I'd like to have a new window open with the set of information relating to that car. I can do that on the same page but wonder how to open it in a new window and to set the size.

thank you

[396 byte] By [xianwinwina] at [2007-11-26 18:06:46]
# 1

This is something you can control only from the client in javascript.

You can't control it from the server end, so there is nothing in Struts which can really help you here.

Instead you have to use HTML/javascript.

You can set the "target" attribute an a link/form. Setting it to be "_blank" means that it will open a new window every time you click on the link.

With regards to setting size, about the only way I know is to use the window.open() javascript call, and you can set the size that way.

evnafetsa at 2007-7-9 5:37:53 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...