Results 1 to 3 of 3

Thread: extJS and HTML select

  1. #1

    Default extJS and HTML select

    Hi All -
    I am new to extJS, and trying to implement the following functionality.
    I have two select drop downs, transformed using ext JS. How can I make sure that if a value in one combo box is selected, the other value should be set back to some default value?


    Below is the code

    Code:
    Ext.onReady(function(){ 
    
    var converted = new Ext.form.ComboBox({ 
    
        typeAhead: true, 
        triggerAction: 'all', 
        transform:'id_Select1', 
        width:600, 
        forceSelection:true, 
        emptyText:'Select' 
    
    }); 
    
    var converted2 = new Ext.form.ComboBox({ 
        typeAhead: true, 
        triggerAction: 'all', 
        transform:'id_select2', 
        width:600, 
        forceSelection:true, 
        emptyText:'Select' 
    }); 
    });
    I am using Coldfusion to query the database and populate the dropdowns:

    Code:
    <cfquery name="getData1" datasource="abc">
       SELECT * FROM table1
    </cfquery>
    
    <cfquery name="getData2" datasource="abc">
       SELECT * FROM table2
    </cfquery>
    
    <select name="select1" id="id_select1">
      <cfoutput query="getData1">
           <option value="#getData1.Id#">#getData1.name#</option>
      </cfoutput>
    </select>
    
     <select name="select2" id="id_select1">
      <cfoutput query="getData2">
           <option value="#getData2.Id#">#getData2.name#</option>
      </cfoutput>
    </select>

  2. #2

    Default

    Can anyone atleast let me know what happens when a normal html select is converted to a extJS combobox. How to set values and all? Just in case, I am using extJS 1.1

  3. #3
    Sencha User
    Join Date
    Nov 2008
    Location
    Toulouse, France
    Posts
    7

    Default

    The Combo is linked to a store. So you have to configure a store, using I guess Ext.Direct with ColdFusion.
    Robusta Code : Java & Web Training and Realizations

Similar Threads

  1. What is ExtJS component equivalent to HTML Select tag with size attribute.
    By khoivu4477 in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 8 Jun 2010, 2:38 PM
  2. How to select text in Html?
    By Atum in forum Ext GWT: Discussion
    Replies: 2
    Last Post: 29 Jan 2010, 12:58 PM
  3. Is there any thing similar to "html select option" in extjs?
    By nani_chinni in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 30 Dec 2009, 12:56 AM
  4. Better way to select HTML option
    By nagir in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 7 Apr 2008, 10:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •