javascript - cakephp link on image escape is not working -


image link in cakephp not working

$this->html->link(         $this->html->image('image',array('class' => $class,                 'id' =>'img_id' )), somelink, array('onclick' =>'jquery(this).modal({width:600,height:400,left:120,top:100}).open(); return false;'),                                         array(),                                         array('escape'=>false)); 

it output

<a href='link' onclick='jquery(this).modal({width:600,height:400}).open(); return false;'> &lt; img src='image_path' &gt;    

it not escaping &lt , > if mention escape=>false, not getting missing?

you have many arguements. try this:

echo $this->html->link(     $this->html->image('image',array('class' => $class,             'id' =>'img_id' )), 'foo', array('escape'=>false, 'onclick' =>'jquery(this).modal({width:600,height:400,left:120,top:100}).open(); return false;') ); 

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -