shivram
(Shivramdega)
1
hi i have a test.js in C:\xampp\htdocs\test\protected\views\topic\js…i have successfully registered…
Now i want to call a function setTop() (i.e function in the test.js file)on a click of a button.
i have written this code(in view) and its not working…
i am a newbie…not able to figure out the error
echo CHtml::button("(+)",array('title'=>"Topic",'onclick'=>setTop()));
plz help.
Check your code, because it should work.
echo CHtml::button("(+)",array('title'=>"Topic",'onclick'=>'js:setTop();'));
PS: Please paste here the resultant HTML if it doesnt work.
shivram
(Shivramdega)
5
thanks Antonio. my code problem…fixed it