Results 1 to 6 of 6

Thread: Extjs and jquery help

  1. #1
    Sencha User
    Join Date
    Dec 2010
    Posts
    11
    Vote Rating
    0
      0  

    Default Extjs and jquery help

    Hi,
    can one please help me out here. I'm new to extJs.
    I need to display a window on the page load ( the page should be grayed out, with the window active and overlapping) , the window should contain a textbox and label and a submit button. Now i want to apply autocomplete plugin of Jquery to the textbox with in the window. i tried adding the jquery adapter but in vain also once the window is displayed the page is not grayed out am i missing any config option please help.. the below is my code


    Code:
    Ext.onReady(function() {
    win = new Ext.Window({
    layout: 'fit',
    width: 350,
    height: 120,
    closeAction: 'hide',
    plain: true,
    title: 'CompanySelect',
    items: new Ext.FormPanel({
    itemId: 'form',
    labelAlign: 'right',
    defaults: { width: 200 },
    defaultType: 'textfield',
    frame: true,
    items: [{
    fieldLabel: 'CompanyName',
    name: 'company',
    itemId: 'company'
    }]
    }),
    buttons: [{
    text: 'Submit'
    }, {
    text: 'Close',
    handler: function() {
    win.hide();
    }
    }]
    });
    win.show();
    var tb = win.getComponent('form');
    var b = tb.getComponent('company').getId();
    //alert(b);
    var data = "Core Selectors Attributes Traversing Manipulation CSS Events Effects Ajax Utilities".split(" ");
    $("#company").autocomplete(data);
    });
    
    and the HTML is


    HTML Code:
    <link rel="stylesheet" href="jquery/jquery.autocomplete.css"/> 
    <script type="text/javascript" language="javascript" src="jquery/jquery-1.4.2.min.js"> </script>
    <script type="text/javascript" language="javascript" src="jquery/jquery.autocomplete.js" > </script>
    <link rel="stylesheet" href="ext-3.3.1/ext-3.3.1/resources/css/ext-all.css" type="text/css" />
    <!--<script language ="javascript" type="text/javascript" src= "ext-3.3.1/ext-3.3.1/adapter/ext/ext-base.js"></script>-->
    <script language ="javascript" type="text/javascript" src= "ext-3.3.1/ext-3.3.1/adapter/jquery/ext-jquery-adapter.js"></script>
    <script language ="javascript" type= "text/javascript" src ="ext-3.3.1/ext-3.3.1/ext-all.js" ></script>
    Thanks in advance.

  2. #2
    Ext JS Premium Member
    Join Date
    Jun 2009
    Location
    Switzerland
    Posts
    83
    Vote Rating
    0
      0  

    Default

    Set the config option modal to true on your window. Also try http://dev.sencha.com/deploy/ext-3.3...ass=Ext.Window
    Talk to me on Twitter @patmatsumura

  3. #3
    Sencha User
    Join Date
    Dec 2010
    Posts
    11
    Vote Rating
    0
      0  

    Default

    yea thanks for the reply.

    Can you please help me out regarding Jquery. i need to apply Jquery autocomplete feature to the textbox with in the modal window.

  4. #4
    Ext JS Premium Member
    Join Date
    Jun 2009
    Location
    Switzerland
    Posts
    83
    Vote Rating
    0
      0  

    Default

    What is in variable "b"? Does it look like this ext-comp-1145? If it does, then try this:
    Code:
    $('#' + b).autocomplete(data);
    Talk to me on Twitter @patmatsumura

  5. #5
    Sencha User
    Join Date
    Dec 2010
    Posts
    11
    Vote Rating
    0
      0  

    Default

    yea it looks like ext-comp-1004, i tried the way you proposed but in vain... any another idea.?

  6. #6
    Ext JS Premium Member
    Join Date
    Jun 2009
    Location
    Switzerland
    Posts
    83
    Vote Rating
    0
      0  

    Default

    What does
    Code:
    console.log($('#' + b).val());
    output?
    Talk to me on Twitter @patmatsumura

Similar Threads

  1. EXTJS 4.0 and jQuery
    By jcar98 in forum Ext: Discussion
    Replies: 2
    Last Post: 24 Feb 2011, 6:52 PM
  2. ExtJS 2.1 + jQuery 1.4
    By jsfan in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 22 Nov 2010, 12:48 PM
  3. Extjs with the new jquery 1.4?
    By dimentox in forum Community Discussion
    Replies: 3
    Last Post: 16 Feb 2010, 7:04 PM
  4. jQuery to EXTJs
    By JSCoder in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 26 Aug 2009, 6:38 AM
  5. ExtJS vs. JQuery
    By thatcoder in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 4 Mar 2008, 12:25 PM

Tags for this Thread

Posting Permissions

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