PDA

View Full Version : TabPanel Form's data does not POST to ASPX page



murphyRic
12 Aug 2009, 7:01 AM
Hi. I am not able to post the Form data(inside a Tabpanel) to an .ASPX page.

ExtJS ver: 2.2
UI arrangement : layout:BORDER/ region:SOUTH / xtype:form / xtype:tabpanel and a 'Submit ' BUTTON.
I need your help to fix this.

Also, I am able to see the form in FF3.0 and NOT able to see in IE6.

Below is my code:



Ext.onReady(function(){

Ext.QuickTips.init();

Ext.form.Field.prototype.msgTarget = 'side';
var viewport = new Ext.Viewport({
layout:'border',
items:[
{
region:'south',
id:'south-panel',
split:true,
layout:'fit',
height: 335,
minSize: 100,
maxSize: 400,
collapsible: true,
title:'My Form Fields',
margins:'0 0 0 0'

//Form Items from here
,items:[{
xtype:'form'
,frame: true
,id:'myform'
,border:false
,url:'http://localhost/mysite/Receive_MyForm_Data.aspx'

//TabPanel
,items:[{
xtype:'tabpanel',
id:'claimformtabpanel',
border:false,
activeItem:0,
tabPosition:'top',
anchor:'100% 100%',
deferredRender:false,
layoutOnTabChange: true,
//Tabs
defaults:{
layout:'form'
,labelWidth:80
,bodyStyle:'padding:0px 10px 10px 0px; background: #dfe8f6'
,hideMode:'offsets'
},

//TAB ITEMS//
items:[{
title:'MyTab1',
layout : 'table',
border : 'false',

items:[{
////Here goes my Tab items///
///
///
///
}]
}]
}]///END OF TabPanel
,buttons:[{
text:'Submit',
handler: function() {
var vals = Ext.getCmp('myform').getForm().getValues();
console.log(vals); //Ext.getCmp('myform').getForm().submit({url: 'http://localhost/mysite/Receive_MyForm_Data.aspx'}); Ext.getCmp('myform').getForm().submit({params:{cmd:'submit'}});
Ext.MessageBox.alert("Success!", "Form submitted");
}
}]//END OF BUTTONS///
}]////END OF FORM///
}]//END OF south-panel ///
}) //END OF viewport//
});

tryanDLS
12 Aug 2009, 11:07 AM
Is your aspx page also creating a FORM tag? FORM tags cannot be nested.

Does firebug show the POST being sent?

murphyRic
12 Aug 2009, 10:04 PM
Thanks for the immediate response.

Q) Is your aspx page also creating a FORM tag? FORM tags cannot be nested.
A) NO. Only <asp:Literal> tag is used to just display a message.
Below is my ASPX page code.



<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Receive_MyForm_Data.aspx.cs" Inherits="MyWebApp.Receive_MyForm_Data" %>


<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>MyForm</title>
</head>
<body>
<asp:Literal ID="LiteralText" runat="server"></asp:Literal>
</body>
</html>
Q) Does firebug show the POST being sent?
A) No.

But today after adding the NAME property (name:'Sampleform') to the form, I am now able to see the POST data being sent (in the firebug). Does the form need the name property also , I thought the id property should be OK.

I am able to see the form in FF3.0 and NOT able to see it in IE6 and no errors are seen in IE6. Need your help on this.

Thanks a lot for your support.

KeithNixon
21 Jun 2011, 10:14 PM
Highly-qualified writers are ready to help you with your written assignments - research papers, custom/term/academic etc. Reasonable prices, no delays, any topics.