How to send a form using Ajax

  1. #1

    How to send a form using Ajax

    Hi everybody,

    I need your help !

    I use the latest version of Ext.Net and Framework 4 of ASP.NET.

    I try to create a form with formpanel. At this time, it seems to be easy, but... not necessarily.
    When I want to submit my form, I have a javascript error and I don't know what it means.

    Here is my ASP.NET code :

    <ext:FormPanel ID="kindFormPanel" Title="Formulaire d'ajout d'un genre" Url="/ManageKinds/EditKinds"
                    Method="POST" runat="server">
                        <ext:FormLayout runat="server">
                                    <ext:Hidden ID="KindID" DataIndex="KindID" runat="server" />
                                    <ext:TextField ID="LabelTextField" FieldLabel="Libellé" DataIndex="Label" Width="250"
                                        AllowBlank="false" EmptyText="Saisissez un libellé" runat="server" />
                        <ext:Toolbar runat="server">
                                <ext:Button ID="AddKind" Text="Ajouter" runat="server">
                                        <Click Fn="validateForm" />
    And here is my javascript code :

    <script type="text/javascript">
            var validateForm = function () {
    My error in javascript is : fElements is undefined

    I think I forgot an element or property but I don't know what is it.

    Can you help me please ?
  2. #2

    I guess a FormPanel is inside ASP <form>, right?

    If so, FormPanel don't generate your own <form>, because nested <form> is not supported. Therefore a FormPanel can't submit itself.

    Please move a FormPanel outside a <form> or just remove a <form>.
  3. #3

    That's right ! I had my FormPanel inside my ASP <form>.
    I deleted my form inside my master page and now it works !

    Thank you very much for your help.
  4. #4


    yes,Please move a FormPanel outside a <form> or just remove a <form>.

Similar Threads

  1. [OPEN] [#129] Can Ajax requests send If-Modified-Since headers
    By anup in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Jan 18, 2013, 4:26 AM
  2. [CLOSED] How to send row to second grid
    By egvt in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 18, 2012, 6:33 PM
  3. [CLOSED] Null Return from Ajax Form Result of Coolitve MVC
    By fondant in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jul 27, 2009, 10:02 PM
  4. Replies: 0
    Last Post: Jul 22, 2009, 4:40 AM
  5. Send Javascripts from Ajax Methods
    By nanosassa in forum 1.x Help
    Replies: 0
    Last Post: Apr 25, 2009, 5:47 PM

Tags for this Thread

Posting Permissions