1. #1
    Ext User
    Join Date
    Jul 2007
    Posts
    72
    Vote Rating
    0
    gurusingh is on a distinguished road

      0  

    Default Combo box transform

    Combo box transform


    Ext gurus

    i have one doubt in combo box.

    i want to populate my combo box with the predefined <select> tag
    Code:
    <select name="ddlTitle" id="ddlTitle" class="inputText">
    	<option value="">Select</option>
    	<option value="Mr">Mr</option>
    	<option value="Mrs">Mrs</option>
    	<option value="Miss">Miss</option>
    	<option value="Ms">Ms</option>
    </select>
    i used the following code and i am getting the combo box also

    Code:
    new Ext.form.ComboBox({
                typeAhead: true,
                triggerAction: 'all',
                transform:'ddlTitle',
                width:135,
                forceSelection:true
            });

    but its not creating at the right position.

    i am creating my rest of my from using
    Code:
     Ext.onReady(function(){ 
        Ext.QuickTips.init(); 
        Ext.form.Field.prototype.msgTarget = 'under'; 
        var simple = new Ext.form.Form({ 
            labelWidth: 115, // label settings here cascade unless overridden 
            method:'post', 
            url:'process.aspx',
            labelAlign: 'left' 
        }); 
    
        simple.fieldset( 
         {legend:'Contact Information'},
            new Ext.form.ComboBox({
                fieldLabel: 'Title',
                hiddenName:'Title',
                store: new Ext.data.SimpleStore({
                    fields: ['abbr', 'Title'],
                    data : Ext.Title.Title 
                }),
                displayField:'Title',
                typeAhead: true,
                mode: 'local',
                triggerAction: 'all',
                emptyText:'Select...',
                selectOnFocus:true,
                width:125, 
                allowBlank:false
            }),
            new Ext.form.ComboBox({
                fieldLabel: 'Title',
                typeAhead: true,
                triggerAction: 'all',
                transform:'ddlTitle',
                width:135,
                forceSelection:true
            }),
            new Ext.form.TextField({ 
                fieldLabel: 'Forename', 
                name: 'txtForename', 
                width:125, 
                allowBlank:false 
            })
    
               ); 
    
    
        simple.addButton('Save', function(){ 
                 if (simple.isValid()) 
                 { 
                    simple.submit({ 
                        waitMsg:'Plz wait ...', 
                        success:function(form, action){ 
                        window.location = "http://www.yahoo.com"; 
                        }, 
                        failure: function(form, action) { 
                          Ext.MessageBox.hide(); 
                          Ext.MessageBox.alert('Error', 'Access Denied!!! '); 
                        } 
                    }); 
                 } 
                 else 
                 { 
                    Ext.MessageBox.alert('Error', 'Please enter all the values'); 
                 } 
                }, simple); 
    
    
        simple.render('form-ct');

    and my HTML markup

    Code:
    <div id="form-ct">
                        <select name="ddlTitle" id="ddlTitle" class="inputText">
    	                    <option value="">Select</option>
    	                    <option value="Mr">Mr</option>
    	                    <option value="Mrs">Mrs</option>
    	                    <option value="Miss">Miss</option>
    	                    <option value="Ms">Ms</option>
                        </select>
                    </div>
    plz advice how to show my transformed combo box next to the label like it did when we are using a seperate .js file for fetching the title

    Thanks
    Guru singh
    Attached Images

  2. #2
    Ext User
    Join Date
    Jun 2007
    Location
    Toronto,Ontario,Canada
    Posts
    19
    Vote Rating
    0
    ToNiC is on a distinguished road

      0  

    Default


    I'm not sure if this will work but add
    Code:
     style="display:none;"
    inside the select tag

  3. #3
    Ext User
    Join Date
    Jul 2007
    Posts
    72
    Vote Rating
    0
    gurusingh is on a distinguished road

      0  

    Default nope its not working for me

    nope its not working for me


    Hi..

    Thanks for your reply, but its not working for me..


    i am checking the docs for how to specify the position of a combo box.


    Thanks
    Guru singh

  4. #4
    Ext User
    Join Date
    Jul 2007
    Posts
    72
    Vote Rating
    0
    gurusingh is on a distinguished road

      0  

    Default any inputs?

    any inputs?


    any inputs?

  5. #5
    Ext User
    Join Date
    Nov 2007
    Posts
    2
    Vote Rating
    0
    tthirsk is on a distinguished road

      0  

    Default


    Hi I'm having the same problem does anyone know how to transform the combo box and values defined in html markup into combo box in Formpanel so that it is position at the correct point.

    Any help appreciated.

  6. #6
    Ext User eclectus's Avatar
    Join Date
    Jan 2008
    Posts
    43
    Vote Rating
    0
    eclectus is on a distinguished road

      0  

    Default


    why are you not simply defining it in the js file?

  7. #7
    Ext User
    Join Date
    Nov 2007
    Posts
    2
    Vote Rating
    0
    tthirsk is on a distinguished road

      0  

    Default


    I am defining in the js but I have a select that is generated server side and I want to transform this but I can't seem to get it working or loose the positioning required.

    I'm a newbie so if there's a better way?

    Thanks

Thread Participants: 3

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar