not work with php
I tries to add the mouseover and onclick event to a row. the php codes (add some lines to the activewidgets_grid function of activewidget.php )
....
$r = "row";
$src = "src";
$html .= " var $r = $name.getTemplate(\"row\");\n";
$html .= " $r.setEvent(\"onclick\", function\(\){this.action(\"myAction\"\)});\n";
$html .= " $name.setTemplate(\"row\", $r);\n";
$html .= " $name.setAction(\"myAction\", function\($src\){alert\($src.getProperty(\"item\/index\"\)\)});\n";
// mouse over
$html .= " var $r = new Active.Templates.Row;\n";
$html .= " $r.setEvent(\"onmouseover\", \"mouseover(this, \'active-row-highlight\')\");\n";
$html .= " $r.setEvent(\"onmouseout\", \"mouseout(this, \'active-row-highlight\')\");\n";
$html .= " $name.setTemplate(\"row\", $r);\n";
$html .= " document.write($name);\n";
$html .= "}\n";
$html .= "catch (error){\n";
$html .= " document.write(error.description);\n";
$html .= "}\n";
$html .= "</"."script".">\n";
however, i cannot see any effect. Would you see what is wrong with my code?
Many thanks
....
$r = "row";
$src = "src";
$html .= " var $r = $name.getTemplate(\"row\");\n";
$html .= " $r.setEvent(\"onclick\", function\(\){this.action(\"myAction\"\)});\n";
$html .= " $name.setTemplate(\"row\", $r);\n";
$html .= " $name.setAction(\"myAction\", function\($src\){alert\($src.getProperty(\"item\/index\"\)\)});\n";
// mouse over
$html .= " var $r = new Active.Templates.Row;\n";
$html .= " $r.setEvent(\"onmouseover\", \"mouseover(this, \'active-row-highlight\')\");\n";
$html .= " $r.setEvent(\"onmouseout\", \"mouseout(this, \'active-row-highlight\')\");\n";
$html .= " $name.setTemplate(\"row\", $r);\n";
$html .= " document.write($name);\n";
$html .= "}\n";
$html .= "catch (error){\n";
$html .= " document.write(error.description);\n";
$html .= "}\n";
$html .= "</"."script".">\n";
however, i cannot see any effect. Would you see what is wrong with my code?
Many thanks
absolutely newbie
April 2,