Two Function run on single Onclick

46 Views Asked by At

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.

1

There are 1 best solutions below

0
Barmar On

You can't have duplicate keys in an array. Put both function call separated by ;.

array('escape' => false, 'onclick' => 'signOut();onClickStr()' )