RE: Sending value from popup to parent window

2005-06-13 Thread Greg Pelly
Fez,

Perhaps I am missing something simple, but couldn't your sendValue()
function just get the .selectedIndex of the multiBox, then you can
iterate through the 's s and get the one your need?  

This seems to be more a question of some JS engineering, at least that
is the simplest way in my mind.  I haven't used html:multibox, though,
so it could be more complicated.

HTH,
Greg


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 13, 2005 7:39 AM
To: user@struts.apache.org
Subject: RE: Sending value from popup to parent window 

Has anybody any advice on this at all...?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 13 June 2005 11:33
To: user@struts.apache.org
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 


 

The link to close this page and send the value is as follows:


Add Client 

The javascript function:


function sendValue(s)
{

var selvalue = s
out.println("variable = " + selvalue");
window.opener.document.createClnForm.clientId.value = selvalue;
window.close(); } 

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.

Add Client 

However what i want to send back is the  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]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Sending value from popup to parent window

2005-06-13 Thread Rafael Taboada
 Hi. I prefer to use radio button instead of checkbox because I select only 
one item from the search result.
  In the search jsp.
 

 And there is a button in order to close the windows and return the value to 
the main jsp:
 


 Of course... the functions are inside a .js:
 var idProveedor = null;
var strRazonSocial = null;
 function seleccionarBusquedaProveedor() {
window.opener.document.forms[0].idProveedor.value = idProveedor;
window.opener.document.forms[0].strRazonSocial.value = strRazonSocial;
window.close();
}
 function setBusquedaProveedor(proveedor, razonsocial) {
idProveedor = proveedor;
strRazonSocial = razonsocial;
}
 That's all
 I hope it can help u =)

-- 
Rafael Taboada
Cell : 511-97753290

"No creo en el destino pues no me gusta tener la idea de controlar mi vida"


RE: Sending value from popup to parent window

2005-06-13 Thread faisal.shoukat
Has anybody any advice on this at all...?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 13 June 2005 11:33
To: user@struts.apache.org
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 





The link to close this page and send the value is as follows:


Add Client


The javascript function:


function sendValue(s)
{

var selvalue = s
out.println("variable = " + selvalue");
window.opener.document.createClnForm.clientId.value = selvalue;
window.close();
}


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.

Add Client


However what i want to send back is the 
 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]



Sending value from popup to parent window

2005-06-13 Thread faisal.shoukat
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 





The link to close this page and send the value is as follows:


Add Client


The javascript function:


function sendValue(s)
{

var selvalue = s
out.println("variable = " + selvalue");
window.opener.document.createClnForm.clientId.value = selvalue;
window.close();
}


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.

Add Client


However what i want to send back is the 
 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