PDA

View Full Version : Submitting Form with Tab Panels



scblue
11 Jun 2010, 2:06 AM
Hi,

I have a form with several xtype:'tabpanel' with config -> deferredRender:'false' and hideMode : 'offsets', but for some reason my form won't submit.

I used this is my form:



buttons:
[
{
id:"wizard-submit",
text:"Submit",
handler : function()
{

wizard.getForm().submit({
url : 'ui/wizard_submit.php',
method : 'POST',

waitMsg: 'Saving...', // Wait Message
success: function () { // When saving data success
Ext.MessageBox.alert ('Status','Update successfully.');

}
});

}
}
]
Any reason why?

Thanks in advance!

scblue
11 Jun 2010, 2:30 AM
Now it throws this exception:

uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: http://localhost/extjs/adapter/ext/ext-base-debug.js (http://localhost/sharonc/framework/extjs/adapter/ext/ext-base-debug.js) :: asyncRequest :: line 2587" data: no]

Help?

Condor
11 Jun 2010, 2:54 AM
That error means that either the url, the method or the post body is invalid.

However, I can't see anything in your code that could cause this...

(are you sure you've put the fields inside the form?)

scblue
13 Jun 2010, 3:05 PM
Hi Condor,

Thanks for the reply.
Yes, I've put everything inside the form.
And still, it won't submit. It doesn't even go to the specified URL and doesn't throw any errors when I put in a bad link.
So, for some reason, it's not calling the URL.
Any help is deeply appreciated. :)

Thanks,
Scblue.

Condor
13 Jun 2010, 10:06 PM
As I said, I can't see anything wrong with your code...

Could you post the code for the entire form?

scblue
14 Jun 2010, 5:07 PM
var wizard = new Ext.form.FormPanel(
{
title:"Create Wizard",
closable:true,
border:false,
url : 'wizard_form'.php,
items:[//this will contain the various wizard steps
{
xtype:"tabpanel",
id:"wizard-tabs",
deferredRender:false,
activeTab: 0,
border:false,
anchor:'100% 100%',
defaults:
{
layout : 'form',
labelWidth : 80,
defaultType : 'textfield',
bodyStyle : 'padding:5px',
deferredRender:false,
hideMode : 'offsets'
},

Condor
14 Jun 2010, 10:24 PM
String doesn't have a 'php' property, so you are setting your url to 'undefined' here!

url : 'wizard_form'.php