You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sri Sankaran <Sr...@sas.com> on 2002/12/03 22:51:51 UTC

[Tags]Sending multiple parameters to a window

Using Struts 1.0.2

The gist of the problem is being able to send a variable number of parameters to a URL while using Javascript.

Background:
I have a list of hyperlinks on a page.  When the user selects any link I would like to present the URL in another window.  I can get this to work as follows

(if you aren't familiar with Nested tags, for the purposes of this discussion, they are identical to their <html> equivalent)

<nested:link forward="relationships"
  target="relWindow">
  <nested:write property="relationship"/>
</nested:link>

However, I have an additional requirement that the new window be "just so" (centered, non-resizable, etc).  So -- enter Javascript.  The above got changed to 

<nested:link href="#"
  onclick="javascript:centerWindow('Relationships.jsp')"
  target="relWindow">
  <nested:write property="relationship"/>
</nested:link>

So far so good.  The called URL, however, needs several parameters to be specified by the caller.  Were it not for the JavaScript, I could simply set the property attribute of the <nested:link> to the bean property that returns a Map.  How can this be accomplished in the present scenario where the call to the URL is mediated by script?

Sri