CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   Building for mobile devices (http://www.codingforums.com/forumdisplay.php?f=70)
-   -   Change event that enables a text field. (http://www.codingforums.com/showthread.php?t=259449)

DamonP 05-01-2012 03:43 PM

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.


All times are GMT +1. The time now is 10:59 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.