:: Forum >>

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

absolutely newbie
Saturday, April 2, 2005
I think it is easier to find out the right HTML with pure HTML and JavaScript before using PHP and PHP page writing. It is simpy to hard to read the code with all the escape. Start simple.
Andreas
Saturday, April 2, 2005

This topic is archived.


Back to support forum

Forum search