[CLOSED] Form Submit

  1. #1

    [CLOSED] Form Submit

    Please light me with Form Submitting:
    Submit function:
            function submit(formPanel) {
                var a = Ext.encode(formPanel.getForm().getValues());
                formPanel.getForm().submit({
                    params: {
                        v:a
                    },
                    standardSubmit:true,
                    waitMsg: 'Submiting...',
                    url: 'Handler_CustomerService.ashx',
                    success: function () {
                        log('Success! End submiting');
                    },
                    failure: function () {
                        log('Error! End submiting');
                    }
                });
            }
    handler:
        public class Handler_CustomerService : IHttpHandler, IReadOnlySessionState
        {
            public void ProcessRequest(HttpContext context)
            {
                this.context = context;
                string comp = context.Request["v"];            
                SubmitHandler dataHandler = new SubmitHandler(context);
                Response sr = new Response(true);
                
                try
                {
                }
                catch (Exception e)
                {
                    sr.Success = false;
                    sr.Message = e.Message;
                }
                sr.Return();
            }
    The problem is I can't get submited values, dataHander has no data.
    And is not a problem in collecting form data because
    var a = Ext.encode(formPanel.getForm().getValues()) is working fine and received in handler.

    I missed something but don't know what!
    Last edited by Daniil; Nov 29, 2012 at 3:50 AM. Reason: [CLOSED]
  2. #2
    Hi @watteeuw,

    SubmitHandler is for submitting GridPanel's data. It should not be used for FormPanel submitting.

    I think you can remove these settings at all.
    params: {
        v:a
    },
    standardSubmit:true
    Submitted data you can get from HttpContext.Current.Request.
  3. #3
    I set the param only to see if is passed to handler.

    Just for the others which have same problem:
    Form Data is in context.Request.Form of type System.Collections.Specialized.NameValueCollection


    Quote Originally Posted by Daniil View Post
    Hi @watteeuw,

    SubmitHandler is for submitting GridPanel's data. It should not be used for FormPanel submitting.

    I think you can remove these settings at all.
    params: {
        v:a
    },
    standardSubmit:true
    Submitted data you can get from HttpContext.Current.Request.

Similar Threads

  1. [CLOSED] Form Submit
    By IanPearce in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: May 07, 2012, 9:28 AM
  2. submit ext combo box as normal form
    By craig2005 in forum 1.x Help
    Replies: 3
    Last Post: Jan 04, 2011, 7:12 PM
  3. [CLOSED] Submit gridpanel data in form submit
    By jchau in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jul 14, 2010, 7:25 PM
  4. Form Submit JS Error
    By cleve in forum 1.x Help
    Replies: 0
    Last Post: Jul 10, 2010, 3:27 AM
  5. [CLOSED] [1.0] Form Submit
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Feb 17, 2010, 8:02 AM

Posting Permissions