Jump to content



Photo

Action On Radio Button

radio button action

  • Please log in to reply
3 replies to this topic

#1 mint

mint

    Newbie

  • Members
  • Pip
  • 13 posts

Posted 27 July 2012 - 10:07 AM

I want to enable a text field and button when the user selects a radio button, I have tried the following code but not working.
echo CHtml::textField('trid','',array('id'=>'trid','size'=>7,'disabled'=>true));
echo CHtml::submitButton('Submit', array('id'=>'submit','name'=>'submit','disabled'=>true));
echo('<b>Dispaly records acoording to status number.</b>');
echo CHtml::radioButton('status',false,array(
"success"=>"function(){
	 $(#trid).attr('enabled',true)';}
	 $(#submit).attr('enabled',true)';",						
));

  • 0

#2 Larry

Larry

    Administrator/Writer

  • Administrators
  • 3,898 posts
  • LocationState College, PA (USA)

Posted 27 July 2012 - 9:47 PM

I'm not sure where you're getting that "success" term from. Is there some docs somewhere that you're using as the basis of this?
  • 0

#3 mint

mint

    Newbie

  • Members
  • Pip
  • 13 posts

Posted 28 July 2012 - 6:49 AM

I have not found it on the docs anywhere, but it was mentioned in the yii framework forum by some one as an example and I think this tag was for a drop down list. Can you suggest some other html option for radio button to do this task.
  • 0

#4 Larry

Larry

    Administrator/Writer

  • Administrators
  • 3,898 posts
  • LocationState College, PA (USA)

Posted 1 August 2012 - 7:26 AM

I can suggest something else in theory, but I'm on vacation right now and don't have the time. If no one has responded in the meantime, I'll reply when I get back from my vacation.
  • 0





Also tagged with one or more of these keywords: radio button, action