-
5 Jul 2009 2:40 AM #1
ext.fly in formpanel
ext.fly in formpanel
Hi all,
I'm a new newbie to this Ext js,I'm trying to get values firstname value in submit button handler,I'm getting null as output in ext.fly,can you please suggest me how to solve this problem.
Code:Ext.onReady(function() { Ext.QuickTips.init(); var requestAjax = function() { alert('Hi, '); } var genres = new Ext.data.SimpleStore({ fields: ['id', 'genre'], data: [['1', 'Comedy'], ['2', 'Drama'], ['3', 'Action']] }); /* var genres = new Ext.data.Store({ reader: new Ext.data.JsonReader({ fields: ['id', 'genre_name'], root: 'rows' }), proxy: new Ext.data.HttpProxy({ url: 'ajax.jsp' }), autoLoad: true }); */ var User = new Ext.FormPanel({ //url: 'movie-form-submit.php', renderTo: document.body, frame: true, title: 'User Registration Form', width: 250, items: [{ xtype: 'textfield', fieldLabel: 'FirstName', id: 'FirstName', name: 'firstName' }, { xtype: 'textfield', fieldLabel: 'LastName', id: 'LastName', name: 'lastName' }, { xtype: 'combo', name: 'genre', fieldLabel: 'Names', mode: 'local', store: genres, displayField: 'genre', width: 120 } ], buttons: [{ text: 'submit', handler: function() { var firstName = Ext.fly(firstName).getValue(); //var tmpParams = this.User.form.getValues(); alert(firstName); } }, { text: 'cancel' }] }); });Last edited by evant; 5 Jul 2009 at 3:22 AM. Reason: Please put code in [code][/code] tags
-
5 Jul 2009 3:06 AM #2
Where did you read about Ext.fly?
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
5 Jul 2009 3:24 AM #3
what do you see?
var firstName = Ext.fly(firstName).getValue();vg Steffen
--------------------------------------
Release Manager of TYPO3 4.5
energlobe.de - german online magazine
-
5 Jul 2009 4:14 AM #4
Ext.fly
Ext.fly
HI,
I've gone through the Ext doc at this location http://www.extjs.com/deploy/dev/docs/ I tried Ext.fly and Ext.get,I'm getting null.
-
5 Jul 2009 4:42 AM #5
again, you obvious don't read exact.
var firstName = Ext.fly(firstName).getValue();
with var firstName you declare a var which is NULL
Ext.fly(firstName).getValue(); you try to get a field with name of the declared var.
firstName != FirstNamevg Steffen
--------------------------------------
Release Manager of TYPO3 4.5
energlobe.de - german online magazine
-
5 Jul 2009 11:20 PM #6
Also, you are using documentation for the wrong version!
http://extjs.com/deploy/ext-3.0-rc3/docs/
Now, are those methods what you need?Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642


Reply With Quote