internet explorer - Make Browser to remember name/password in form by ExtJS 3 -
internet explorer - Make Browser to remember name/password in form by ExtJS 3 -
i have create form, browser can see , save password. found lots of sollutions, , in firefox - illustration - user owlness's sollution nice , useful. chrome doesn't show , console says: uncaught typeerror: cannot phone call method 'addunits' of null
<form id="auth-form" action="" method="post"> <input id="auth-username" type="text" name="username" class="x-hidden"> <input id="auth-password" type="password" name="password" class="x-hidden"> <input id="auth-submit" type="submit" class="x-hidden"> </form>
...
new ext.formpanel({ region: 'south', //id: 'login', el: 'auth-form', autoshow: true, height: 125, title: 'login', padding: 5, frame: true, labelwidth: 80, defaulttype: 'textfield', defaults: { allowblank: false, width: 250 }, items: [{ fieldlabel: 'username', el: 'auth-username', autoshow: true, inputtype: 'text', //id: 'username', name: 'username' }, { fieldlabel: 'password', el: 'auth-password', autoshow: true, inputtype: 'password', //id: 'password', name: 'password' }], // auto focus ... // submit on come in ... buttons: [{ text: 'login', type: 'submit', //el: 'auth-submit', //autoshow: true, handler: function (button) { var b = button; // scope var f = b.ownerct.ownerct.getform(); if (!f.isvalid()) { return; } f.standardsubmit = true; b.ownerct.disable(); my.ajax.login({ scope: this, success: function (res) { f.submit(); win.close(); }, failure: function () { b.ownerct.enable(); }, params: f.getfieldvalues() }); } }] })
can help me, can do?
you can save them cookies:
ext.util.cookies.set('username', usernamevalue, new date().add(date.day, 90)); // ... items: [{ fieldlabel: 'username', el: 'auth-username', autoshow: true, inputtype: 'text', //id: 'username', name: 'username', value: ext.util.cookies.get('username') }, { fieldlabel: 'password', el: 'auth-password', autoshow: true, inputtype: 'password', //id: 'password', name: 'password', value: ext.util.cookies.get('password') }]
internet-explorer google-chrome extjs extjs3
Comments
Post a Comment