PDA

View Full Version : Problem with working response of the formpanel submit



BKrisz79
30 Nov 2007, 11:32 PM
Hi,

I'm a little bit confused now, so I need a little help. I started using extjs yesterday, howerver I'm not a newbie programmer. First of all, before this (before extjs) I have only used normal POST request in my programs and ajax request like this xydiv.innerHTML=httpreq.responseText.

So the problem what I would like to solve is just an example, in normally I will use more difficult forms. So I have a page where there are a link like new item and under that a div (id="listRows"). If I click on the new item link it opens an extjs formpanel with 1 textfield. If I fill it I and clicl on "Mehet" button I submit it to an ajax program which insert the item into a mysql database (the table contains an ID and an NAME field) table and after query the table and send back to the form. After success the I would like to refresh the div with the responsed content and close the panel. Normally in older time I simple make a table in the ajax php and send back the table and I give the response to the innerHTML of the div. But it not works for me I think because of the json style or something. Here is my applayout js.

[CODE]// reference local blank image
Ext.BLANK_IMAGE_URL = '../../extjs/resources/images/default/s.gif';

// create namespace
Ext.namespace('studioManager');

// create application
studioManager.app = function() {
// private variables
var formNewTopic = new Ext.form.FormPanel({
baseCls: 'x-plain',
labelWidth: 80,
defaultType: 'textfield',

items: [{
fieldLabel: '

santosh.rajan
30 Nov 2007, 11:44 PM
See this post a few posts below yours.
http://extjs.com/forum/showthread.php?t=19673
It shows how the response to a submit is returned. There are many posts on this subject here.
The returned object is in action.result