Templates y Temas para ExtJS y Sencha Touch Bleext!
Bleextop! un desktop OpenSource para Ext4 y CodeIgniter http://bit.ly/pUwLJO
Necesito algo de ayuda por favor
  • Vote Up0Vote Down JALFJALF November 2010
    Posts: 15
    Hola a todos, bueno estoy iniciando en esto y tengo ya un pequeño recorrido haciendo aplicaciones web. Pero esta ves quiero adentrarme en el mundo de las aplicaciones realizadas con ExtJS pero.... haciendo un simple ejemplo.... me he quedado algo corto y lo expongo aquí a ver si me pueden tal ves dar una mano.

    Mi pregunta es como puedo acceder a un xtype con su id o itemId ??? alguien me puede echar una manito con esto?

    Lo que pasa es que quiero hacer una pequeña prueba y es que cuando presiono un botón, pueda volver visible un spacer que por defecto está hidden:true ¿me comprenden? el spacer tiene por id crgAjax

    Espero que me puedan ayudar Salu2 y de ante mano muchas gracias por la ayuda que me puedan prestar

    index.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Devasoft</title>
    <link rel="stylesheet" type="text/css" href="js/ext-3.3.0/resources/css/ext-all.css" />
    <link rel="stylesheet" type="text/css" href="js/ext-3.3.0/resources/css/xtheme-blue.css" />
    <script type="text/javascript" src="js/ext-3.3.0/adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="js/ext-3.3.0/ext-all.js"></script>
    <script type="text/javascript" src="js/ext-3.3.0/locale/ext-lang-es.js"></script>
    <script type="text/javascript" src="js/main.js"></script>
    <script type="text/javascript">
    Ext.onReady(devasoft.login.init,devasoft.login,function(){Ext.QuickTips.init()});
    </script>
    </head>
    <body>
    </body>
    </html>


    main.js
    Ext.namespace('devasoft');
    Ext.BLANK_IMAGE_URL = 'js/ext-3.3.0/resources/images/default/s.gif';

    devasoft.login = {
    init: function(){
    this.form = new Ext.FormPanel({
    xtype: 'form',
    border: false,
    padding: 5,
    method: 'POST',
    url: 'login.php',
    region: 'center',
    itemId: 'itmformIdentificacion',
    labelWidth: 60,
    unstyled: true,
    standardSubmit: true,
    id: 'formIdentificacion',
    items: [
    {
    xtype: 'textfield',
    fieldLabel: 'Usuario',
    anchor: '100%',
    name: 'usu',
    itemId: 'itmUsu',
    id: 'usu'
    },
    {
    xtype: 'textfield',
    fieldLabel: 'Password',
    anchor: '100%',
    inputType: 'password',
    name: 'pass',
    itemId: 'itmPass',
    id: 'pass'
    },
    {
    xtype: 'container',
    layout: 'hbox',
    activeItem: 0,
    id: 'cnt1',
    layoutConfig: {
    align: 'middle'
    },
    items: [
    {
    xtype: 'spacer',
    flex: 1,
    id: 'esp1'
    },
    {
    xtype: 'spacer',
    html: '<img src="http://static.ak.fbcdn.net/rsrc.php/zb/r/GsNJNwuI-UM.gif" width="16" height="11" />',
    width: 16,
    height: 11,
    hidden: true,
    id: 'crgAjax'
    },
    {
    xtype: 'spacer',
    width: 5,
    id: 'esp3'
    },
    {
    xtype: 'button',
    text: 'Entrar',
    width: 50,
    type: 'button',
    itemId: 'itmbtnEntrar',
    id: 'btnEntrar',
    handler: this.enviarFormulario,
    scope: this
    }]
    }]
    });

    this.win = new Ext.Window({
    xtype: 'window',
    title: 'Davasoft :: Identificación de Usuario',
    width: 250,
    height: 114,
    closable: false,
    resizable: false,
    draggable: false,
    layout: 'border',
    items: [this.form]
    });
    this.win.show();
    },

    enviarFormulario: function() {
    crgAjax.hidden = false;
    }
    }

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook Sign In with Twitter

Sign In Apply for Membership

Poll

No poll attached to this discussion.