Hi,
How can I set the value of textarea which has to be populated from a callout item.
In the FORMAPI I have the following code...
function init()
{
IWEventRegistry.addItemHandler('/HomeCountry/Home_Country_Portlet/Metadata', 'onCallout', handleCallout);
}
function handleCallout(item)
{
window.open("/iw-bin/iw_cgi_wrapper.cgi/sample.ipl?XPath=" + item.getName(),"MetadataCallout",
"width=700,height=500,status=yes,toolbar=no,location=no,resizable=yes,scrollbars=yes,top=50");
}
function accumulate(selectedValue)
{
alert(selectedValue);
}
In the perl file I have the following...
function set_datacapture_item_value( selectedValue )
{
if ((window.opener == null) ||
(window.opener.closed))
{
return false;
}
var calloutForm = eval($form_name);
if (!calloutForm)
{
return false;
}
var calloutElementFound = false;
for ( i = 0 ; i < calloutForm.elements.length ; i++ )
{
if (calloutForm.elements.name == '$element_name')
{
//calloutForm.elements.value = selectedValue;
parent.getScriptFrame().accumulate(selectedValue);
calloutElementFound = true;
break;
}
}
if (!calloutElementFound)
{
return false;
}
return true;
}
Can Someone suggest, How can I set the value of the callout item in FORMAPI? I am passing the value to accumulate function..But it is not working...
Thanks in Advance...