Go Back   CodingForums.com > :: Client side development > General web building > Building for mobile devices

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-01-2012, 03:43 PM   PM User | #1
DamonP
New to the CF scene

 
Join Date: Apr 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
DamonP is an unknown quantity at this point
Change event that enables a text field.

Hello,

I am relatively new programmer and was wondering if I anyone could help me figure this out. I am using Sencha touch 2 and I want to enable a text field after a selection is made in my select field. I wanted to accomplish this by using a listener, but I am not entirely sure how I would go about doing so.

In the following code, I used a listener to open up a message box, so I see how the listener functions, but I am not sure how I would go about replacing that Msg box with a text field.

Code:
                     {
                        xtype:'selectfield',
                        name:'drugs',
                        label: 'Do you take recreational drugs?',
                        labelWidth: 600,
                             options:[
                                 
                                {text:'no', value: 'no'},
                                {text:'yes', value: 'yes'},
                                {text:'N/A', value: 'na'},
                                ],
                                                            
                                listeners: {
                                change: function (select, newValue, oldValue) {
                                    Ext.Msg.alert('change', newValue.data.value);
                                } 
                                }
                                },
Any help with this situation would be very appreciated.
DamonP is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:38 AM.


Advertisement
Log in to turn off these ads.