1 Reply Latest reply on Jun 20, 2008 1:19 PM by marianorauch

    Ext Js formpanel

    marianorauch
      Hi,
      I have login form, my problem is the tab between user field and password field. I need two tab for go to next field.
      I run the example in HTML and that run well.
      I work with Ext Js 2.1.

      My application has :

      var win = new Ext.air.NativeWindow({
      id: 'idlogin',
      file: 'login.html',
      width: 300,
      height:150,
      maximizable: false,
      resizable: false
      });

      win.getNative().alwaysInFront = true;


      My login html is:

      <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" " http://www.w3.org/TR/html4/loose.dtd">
      <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title>Page - Login</title>

      <link rel="stylesheet" type="text/css" href="js/ext-2.1/resources/css/ext-all.css" />
      <link rel="stylesheet" type="text/css" href="js/ext-2.1/air/resources/ext-air.css" />

      <script type="text/javascript" src="js/AIRAliases.js"></script>
      <script type="text/javascript" src="js/AIRIntrospector.js"></script>
      <script type="text/javascript" src="js/jquery-1.2.6.min.js"></script>
      <script type="text/javascript" src="js/ext/ext-base.js"></script>
      <script type="text/javascript" src="js/ext/ext-all.js"></script>
      <script type="text/javascript" src="js/ext/ext-air.js"></script>

      <script type="text/javascript" src="js/app/login.js"></script>

      </head>
      <body>
      <script type="text/javascript">
      var win = window.nativeWindow;

      var fsf = new Ext.form.FormPanel({
      url:'save-form.php',
      frame:true,
      region: 'center',
      //title: 'Login',
      //bodyStyle:'padding:5px 5px 0',
      width: 350,
      heigth: 500,
      defaultType: 'textfield',
      items: [{
      fieldLabel: 'User',
      name: 'user',
      id: 'fuser',
      allowBlank:false
      },{
      fieldLabel: 'Password',
      name: 'password',
      id: 'fpassword',
      allowBlank:false,
      inputType:'password'
      }],
      buttons: [{
      text: 'Send',
      handler: function(){
      var usr = fsf.findById('fuser').getValue();
      var passw = fsf.findById('fpassword').getValue();
      app.login.login(usr, passw);
      }
      }]
      });

      var nav = new Ext.Panel({
      title: '',
      //region: 'center',
      frame: true,
      width: 350,
      heigth:200,
      items: [fsf,
      {xtype: 'box',
      autoEl: { html:"<div align='right'><a href='' onclick='javascript:openLink(\" http://www.homepage.com/\");' >New Account Signup</a></div>"}
      }]
      });

      //fsf.render(document.body);
      var viewport = new Ext.Viewport({
      layout:'fit',
      items:[nav]
      });

      win.visible = true;
      win.activate();
      </script>
      </body>
      </html>