php - Yii: Issue in RadioButtonList -


problem in radiobuttonlist. having 2 radio buttons shown below. performing ajax action on first radio button.

but when try click second radio button, first 1 not getting unchecked , not able check second one.

<?php echo chtml::radiobuttonlist( 'ck_skill','',     array(4 => 'professional skill', 5 => 'suggestion'),      array('separator' => ' ',     'onchange'=>chtml::ajax(array('type'=>'post', 'datatype'=>'json',"url" =>array("search/search"),     "success"=>"function(response){          $('#textfield-wrapper').html(response.data);      }", ))));?> 

what missing here ?

i think article can help:

http://www.yiiframework.com/wiki/110/styling-radio-buttons/

or one: http://code.dimilow.com/yii-radio-button-list-example-or-how-to-remove-the-line-break-separator/

things notice in code (yii class reference):

  • where model?
  • where select name?

anyway, below example of this, try take out javascript code, make easier figure out problem:

<?php echo chtml::radiobuttonlist($model, 'ck_skill',     array(4 => 'professional skill', 5 => 'suggestion'),      array('separator' => ' ',     'onchange'=>chtml::ajax(array('type'=>'post', 'datatype'=>'json',"url" =>array("search/search"),     "success"=>"function(response){          $('#textfield-wrapper').html(response.data);      }", ))));?> 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -