Has anybody any advice on this at all.......?
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 13 June 2005 11:33
To: [email protected]
Subject: Sending value from popup to parent window
Hi,
I am a bit stuck on implementing the following so all help is
appreciated.
I open up a search page as a pop up window. The user implements the
search options and is returned a number of rows. The user then selects
one of these rows using a check box which I have defined as a multibox
in my jsp.
The problem I have is populating the field on the parent window with the
value of the multibox?
In the JSP i define my multibox as such
<html:multibox name="actionClientForm" property="resourceIds">
<bean:write name="client" property="resourceId"/>
</html:multibox>
The link to close this page and send the value is as follows:
<td align="right">
<html:link href="javascript:sendValue();">Add Client</html:link>
</td>
The javascript function:
<script language="JavaScript">
function sendValue(s)
{
var selvalue = s
out.println("variable = " + selvalue");
window.opener.document.createClnForm.clientId.value = selvalue;
window.close();
}
</script>
If I put a value of 1 in the link where i call the javascript it works
fine and puts 1 into the correct field on the parent window.
<td align="right">
<html:link href="javascript:sendValue(1);">Add Client</html:link>
</td>
However what i want to send back is the
<bean:write name="client" property="resourceId"/> of the selected
multibox.
i tried using bean define but that did not seem to work.
The property resourceIds of the actionClientForm is a collection.
Anyone know how to do this?
thanks
fez
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]