ar_monteagudo
Posts: 2
|
| Posted: 02/15/2007, 8:34 PM |
|
Good morning to CCS gurus...
Just a follow up question above. Does anyone here already tried using a single PopUpList to populate a field in different forms?
function SetOpenerValue(CdCrs)
{
window.opener.document.myform.myinput.value = CdCrs;
window.opener.focus();
window.close();
}
<a onclick='SetOpenerValue("{CD_CRS}");return false;' href="{CD_CRS_Src}">{CD_CRS}</a>
with the above code you can send the value to the myform.myinput.value but what if i want to use the same PopUpList now give another form a value. For example myform2.myinput2.value. Could this be done? I would like to reuse the same PopUpList that will return the same info rather than creating multiple number of PopUpList for different Forms.
Can anyone help me. I know for sure that many user will benefit from these codes.
thanks in advance.
|
 |
 |
Tuong Do
|
| Posted: 02/21/2007, 6:29 PM |
|
Define a function in the opener as follow
function Testfunction(avalue)
{
document.myform.myinput.value = avalue;
}
THEN in the PopUplist
function SetOpenerValue(CdCrs)
{
window.opener.Testfunction(CdCrs);
window.opener.focus();
window.close();
}
"ar_monteagudo" <ar_monteagudo@forum.codecharge> wrote in message
news:245d5344073d41@news.codecharge.com...
> Good morning to CCS gurus...
>
> Just a follow up question above. Does anyone here already tried using a
> single
> PopUpList to populate a field in different forms?
>
> function SetOpenerValue(CdCrs)
> {
> window.opener.document.myform.myinput.value = CdCrs;
> window.opener.focus();
> window.close();
> }
>
> <a onclick='SetOpenerValue("{CD_CRS}");return false;'
> href="{CD_CRS_Src}">{CD_CRS}</a>
>
> with the above code you can send the value to the myform.myinput.value but
> what
> if i want to use the same PopUpList now give another form a value. For
> example
> myform2.myinput2.value. Could this be done? I would like to reuse the same
> PopUpList that will return the same info rather than creating multiple
> number
> of PopUpList for different Forms.
>
> Can anyone help me. I know for sure that many user will benefit from these
> codes.
>
> thanks in advance. 
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
Almond
|
| Posted: 02/21/2007, 7:05 PM |
|
Thanks for the help.
It was exactly what I did and it went well. Im kinda new with CCS and JavaScript so I researched about it and now I can use also the PopUpList on all other form just by renaming the recieving form with just one name based on the JavaScript in the PopUpList Window and is working like a charm.
thanks again and more power to CCS.
If anyone needs the code just msg me and i will gladly share it to those whom need it.
|
|
|
 |