Reputation: 11
hi i am trying to run two functions on single onclick. here is me code.
echo $this->Html->link('<span class="image"><i class="ico ico-logout"></i></span><span>' . __('Sign Out5') . '</span>', array('controller' =>'users', 'action' => 'logout', 'admin' => false), array('escape' => false, 'onclick' => 'signOut()','onClick' => 'onClickStr()' ));
look at this...
array('escape' => false, 'onclick' => 'signOut()','onClick' => 'onClickStr()' )..
i tried like
array('escape' => false, 'onclick' => 'signOut()', 'onClickStr()' )
but not worked.
i tried on many way still not get any results.
Upvotes: 0
Views: 41
Reputation: 780714
You can't have duplicate keys in an array. Put both function call separated by ;
.
array('escape' => false, 'onclick' => 'signOut();onClickStr()' )
Upvotes: 0