Jul 10, 2010, 3:27 AM
Form Submit JS Error
The following is a simple page setting up with two forms. While I click "Submit 1", client side error occurs. Anyone can help?
Saying length is undefined.
I've tried to erase FormID attribute in DirectEvents.Click, works fine but those fields belong to Form2 and ViewState were submitted and that's not I really wanted (or, do I need to live with it?).
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Form Error</title>
</head>
<body>
<form runat="server" id="theForm">
<ext:ResourceManager runat="server" ID="theManager" IDMode="Ignore" Theme="Access" EnableViewState="false" ManageEventsViewState="false" />
<ext:Viewport runat="server" Layout="fit">
<Items>
<ext:Panel runat="server" Border="false">
<TopBar>
<ext:Toolbar runat="server">
<Items>
<ext:Button runat="server" Text="Submit1">
<DirectEvents>
<Click CleanRequest="true" FormID="Form1" Method="POST"
Url="/Organization.aspx/_ToSave" />
</DirectEvents>
</ext:Button>
<ext:Button runat="server" Text="Submit2">
<DirectEvents>
<Click CleanRequest="true" FormID="Form2" Method="POST"
Url="/Organization.aspx/_ToSave" />
</DirectEvents>
</ext:Button>
</Items>
</ext:Toolbar>
</TopBar>
<Items>
<ext:BorderLayout runat="server">
<West>
<ext:FormPanel runat="server" ID="F1" FormID="Form1" Title="Form1" Width="300">
<Items>
<ext:FormLayout runat="server" IDMode="Static">
<Anchors>
<ext:Anchor Horizontal="100%">
<ext:TextField runat="server" ID="West_Field1">
</ext:TextField>
</ext:Anchor>
</Anchors>
</ext:FormLayout>
</Items>
</ext:FormPanel>
</West>
<Center>
<ext:FormPanel runat="server" ID="F2" FormID="Form2" Title="Form2">
<Items>
<ext:FormLayout runat="server" IDMode="Static">
<Anchors>
<ext:Anchor Horizontal="100%">
<ext:TextField runat="server" ID="Center_Field1">
</ext:TextField>
</ext:Anchor>
</Anchors>
</ext:FormLayout>
</Items>
</ext:FormPanel>
</Center>
</ext:BorderLayout>
</Items>
</ext:Panel>
</Items>
</ext:Viewport>
</form>
</body>
</html>
Error Screen shows like the followingSaying length is undefined.
I've tried to erase FormID attribute in DirectEvents.Click, works fine but those fields belong to Form2 and ViewState were submitted and that's not I really wanted (or, do I need to live with it?).