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!
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,