Jump to content
Larry Ullman's Book Forums
Sign in to follow this  
mint

Action On Radio Button

Recommended Posts

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)';",						
));

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...