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;'> < img src='image_path' >
it not escaping < , > 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
Post a Comment