Bman900
(Balint2005)
1
Here is how my button looks now with my attempt to make an image out of it but it did not work 
<?php
echo CHtml::ajaxButton(
'Rate Up',
array('videos/rating'),
array( 'update'=>'#req_res02',
'data' =>array('video'=>$model->id, 'author' =>$model->author->id),
'type' => 'POST'),
array('image'=>'/ajaxbutton.png')
);
?>
How could I turn the standard ajaxbutton into an image of my choice?
wisp
(Wisp)
2
Wouldn’t it be easier to just use a background image with CSS?
Bman900
(Balint2005)
3
Now am assuming this must be done in the $htmlOptions array?
Edit: I have got it and I will post my code for any one else looking for the same thing.
<?php
echo CHtml::ajaxButton(
'',
array('videos/rating'),
array( 'update'=>'#req_res02',
'data' =>array('video'=>$model->id, 'author' =>$model->author->id, 'kiwi' => '-1'),
'type' => 'POST'),
array("style"=>"background-image:url(http://www.fish-and-vegetarian-recipes.com/image-files/kiwi-icon.jpg)")
);
?>