Skip to content Skip to sidebar Skip to footer

How Do I Prevent $html-link() From Removing The Single Quotes When Adding An 'onmouseover' Event In Cakephp?

Trying to use an onmouseover event echo $html->link('Dashboard', '/dashboard/index', array('onmouseover' => 'Tip('Test');') ); becomes , '/dashboard/index', array("onmouseover" => "Tip('Test');"), null, false);

The last parameter is the escape option. It defaults to true.

Solution 2:

This should work:

echo$html->link("Dashboard", 
     "/dashboard/index", 
     array("onmouseover" => "Tip('Test');"),
     array('escape' => false));

Post a Comment for "How Do I Prevent $html-link() From Removing The Single Quotes When Adding An 'onmouseover' Event In Cakephp?"