3.2.0

onclick with php

I'd like to use the onlick-Event in a php-file like shown in activewidgets.php.

I have added the following lines:

$html .= ' row.setEvent("onclick", function(){this.action("myAction")});\n";
$html .= " $name.setTemplate('row', row);\n";
$html .= " $name.setAction(\"myAction\", function(src){alert(src.getProperty(\"item/index\"))});\n";

But this doesn't work and I think it isdue to the ' at
' row.setEvent("onclick", function(){this.action("myAction")});\n";, but I don't know what to write instead.

Thanks a lot!
grace
April 4,
Probably there should be single quote at the end as well

$html .= ' row.setEvent("onclick", function(){this.action("myAction")});\n';
Alex (ActiveWidgets)
April 4,

This topic is archived.

See also:


Back to support forum