textarea in tablepane cell
Hi Guys,
I've bind a textarea to show up in a tablepane cell and it's working fine as follow:
this the column injh question:
<column colName="FollowUp" header="FollowUp Comments" width="9%" style="text-align:left;" OnDrawCell="txtFollowUp"/>
txtFollowUp method:
Method txtFollowUp(pTable As %ZEN.Component.tablePane, pName As %String, pSeed As %String) As %Status
{
&html<<textarea name="followup" name="followup" rows="3" text="#(%query(pName))#" style=" width: 95%;" onchange="zenPage.saveFollowUp(this,#(%query("id"))#);">#(%query(pName))#</textarea>>
Quit $$$OK
}
and
the client method executed textarea onchange:
ClientClassMethod saveFollowUp() [ Language = javascript ]
{
var table = zenPage.getComponentById('MissingItemsTable');
if ((table.selectedIndex >= 0) && (table.getRowData(table.selectedIndex) != null)) {
var follow=table.getRowData(table.selectedIndex).FollowUp;
}
On change I would like to be able to pickup the text entered in the textarea while typing it of finished from typing but client method is not picking up the typed text, so any help?
Hi Guys,
I've bind a textarea to show up in a tablepane cell and it's working fine as follow:
this the column injh question:
<column colName="FollowUp" header="FollowUp Comments" width="9%" style="text-align:left;" OnDrawCell="txtFollowUp"/>
txtFollowUp method:
Method txtFollowUp(pTable As %ZEN.Component.tablePane, pName As %String, pSeed As %String) As %Status
{
&html<<textarea name="followup" name="followup" rows="3" text="#(%query(pName))#" style=" width: 95%;" onchange="zenPage.saveFollowUp(this,#(%query("id"))#);">#(%query(pName))#</textarea>>
Quit $$$OK
}
and
the client method executed textarea onchange:
ClientClassMethod saveFollowUp() [ Language = javascript ]
{
var table = zenPage.getComponentById('MissingItemsTable');
if ((table.selectedIndex >= 0) && (table.getRowData(table.selectedIndex) != null)) {
var follow=table.getRowData(table.selectedIndex).FollowUp;
}
On change I would like to be able to pickup the text entered in the textarea while typing it of finished from typing but client method is not picking up the typed text, so any help?
Thanks
It looks like where you defined your method, it takes zero arguments. When you're calling it, you're providing two. That would make the event not work properly.
Thanks David
Try this:
That worked, thanks you very much Vitaliy.