Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Dec 2010
    Posts
    3
    Vote Rating
    0
    Prathibha is on a distinguished road

      0  

    Default Get value from ext.window

    Get value from ext.window


    Hi,
    I am trying to retrieve the textfield 'remail' value using
    var pass = Ext.getCmp('win').getForm().findField('remail').getValue();

    But I get a error 'Ext.getCmp(...)' is null or not an object
    Please help me out.

    Here is my entire code.
    Thanks & regards
    Prathibha

    <script language="javascript">
    Ext.onReady(function() {
    {
    var myBtnresetHandler = function(btn) {
    var pass = Ext.getCmp('win').getForm().findField('remail').getValue();
    alert(pass);
    document.getElementById("hdnpassword").value = pass;
    document.order.btnreset.click();
    }
    }
    var win;
    var button = Ext.get('show-btn');

    button.on('click', function() {
    // create the window on the first click and reuse on subsequent clicks
    if (!win) {
    win = new Ext.Window({
    id: 'forgotPasswrdWin',
    title: 'Password Reset',
    closable: true,
    closeAction: 'hide',
    width: 490,
    autoHeight: true,
    bodyStyle: 'background-color:#FFF;padding:20px',
    items: [{
    xtype: 'panel',
    layout: 'table',
    unstyled: true,
    style: 'background-color:#FFF;',
    layoutConfig: {
    columns: 2
    },
    defaults: {
    unstyled: true,
    padding: 5
    },
    items: [{
    layout: 'form',
    anchor: '100%',
    items: [{
    fieldLabel: 'Email Address',
    id: 'remail',
    name: 'remail',
    xtype: 'textfield',
    width: 200
    }]
    }, {
    items: [{
    xtype: 'button',
    text: 'Reset Password',
    id: 'recover-btn',
    style: 'margin-top:-5px',
    handler: myBtnresetHandler
    }]
    }]
    }]
    });
    }
    win.show(this);
    });
    });

    </script>

    <tr><td ><a class="linkHeaders" id="show-btn" herf="">Forgot your password?</a></td></tr>

  2. #2
    Ext JS Premium Member syscobra's Avatar
    Join Date
    Nov 2007
    Location
    Venezuela
    Posts
    140
    Vote Rating
    0
    syscobra is on a distinguished road

      0  

    Default


    I think you missed the Ext.getCmp point, you have to pass the id of the window... the call should be:

    Ext.getCmp('forgotPasswrdWin').getForm() ...

    If it doesn't work maybe is because you have a lot of panels in there so you should do something like:
    Ext.getCmp('forgotPasswrdWin').items.itemAt(0).items.itemAt(0).getForm()...

    You have a var in memory called win so you can access that one too:

    win.items.itemAt(0).items.itemAt(0).getForm()...

    Also, as you used an static id for the textfield you can ge4t the value from it too...
    Ext.getCmp('remail').getValue()

    Please take a look at Docs and read the options you have to pass to the functions...

    Also, you can see some screencasts from our friend Jay Garcia about the Problems of using Ext.getCmp()... http://tdg-i.com/392/ext-js-screenca...-of-ext-getcmp

    You can get a good book to learn too. There are plenty of them out there. Online you can find Ext in Action from our friend Jay Garcia here: http://www.manning.com/garcia
    Javier Rincón aka SysCobra

Similar Threads

  1. Window hide then close vs window close... Problems re-opening the window.
    By zhegwood in forum Ext 3.x: Help & Discussion
    Replies: 7
    Last Post: 11 Jan 2010, 5:42 PM
  2. [FIXED] Window.setAutoHide() closes window on window moving
    By sorrro in forum Ext GWT: Bugs (2.x)
    Replies: 1
    Last Post: 6 Oct 2009, 6:50 AM
  3. [OPEN] [CLOSED] Window that opens child Window - Field loses focus immediately
    By jonjanisch in forum Ext GWT: Bugs (2.x)
    Replies: 3
    Last Post: 10 Sep 2009, 9:10 AM
  4. Modal window mask width problem - shows Hz scrollbar in parent window
    By satishp in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 27 May 2009, 11:46 PM
  5. Replies: 5
    Last Post: 23 Jul 2008, 8:49 AM

Thread Participants: 1