Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8571437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:46:53+00:00 2026-06-11T18:46:53+00:00

When I execute the below code, i can see an exception in my chrome

  • 0

When I execute the below code, i can see an exception in my chrome logged like:

Uncaught TypeError: Object [object Object] has no method ‘getEl’

var search = new Ext.form.Panel({
    renderTo: 'pan',
    title: 'Basic Panel',
    collapsible:true,
    width: 400,
    defaults: {width: 230},
    defaultType: 'textfield',
    bodyPadding: 10,
    //layout: 'form',
    frame:true,
    items: [{
            fieldLabel: 'Username',
            name: 'username',
            id: 'username',
            allowBlank:false
        },
        {
            fieldLabel: 'Password',
            name: 'password',
           inputType:'password',
            allowBlank:false
        },

        {
            fieldLabel: 'First Name',
            name: 'firstname',
           inputType:'text',
            allowBlank:false
        }, 
        {
            fieldLabel: 'Last Name',
            name: 'lastname',
           inputType:'text',
            allowBlank:false
        },
        {
            fieldLabel: 'E-Mail Address',
            name: 'email',
           vtype:'email',

           allowBlank:false
        },

        {
            fieldLabel: 'State',
            name: 'state',
           allowBlank:false
        },
        {
            fieldLabel: 'City',
            name: 'city',
           allowBlank:false
        }, 
       {
            fieldLabel: 'Country',
            name: 'country',
           allowBlank:false
        }, 
        {
            inputType: 'hidden',
            id: 'submitbutton',
            name: 'myhiddenbutton',
            value: 'hiddenvalue'
        }

    ],
    buttons: [{
        text: 'Submit',
        handler: function() {
            search.getForm().getEl().dom.action = 'FormServlet';
            search.getForm().getEl().dom.method = 'POST';
            search.getForm().submit();
        }
    }]

I have defined the servlet in the web.xml file which contains the name, class and url.

Please let me know how to resolve this issue.

Regards,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T18:46:54+00:00Added an answer on June 11, 2026 at 6:46 pm

    Don’t make it that complicated. I guess ExtJS overrides your settings or didn’t use them at all cause you didn’t used the appropriate config properties to set this.

    Here are the API links for both

    • method
    • url

    Here is your demo code extended with these

    var search = new Ext.form.Panel({
        renderTo: 'pan',
        title: 'Basic Panel',
        collapsible:true,
        width: 400,
        defaults: {width: 230},
        defaultType: 'textfield',
        bodyPadding: 10,
        url: 'FormServlet', // you can fix a parameter like this : FormServlet?action=create
        action: 'POST',
        frame:true,
        items: [
             //....
        ],
        buttons: [{
            text: 'Submit',
            handler: function() {
                search.getForm().submit();
            }
        }]
    

    Or do it this way to be more flexible

    var search = new Ext.form.Panel({
        renderTo: 'pan',
        title: 'Basic Panel',
        collapsible:true,
        width: 400,
        defaults: {width: 230},
        defaultType: 'textfield',
        bodyPadding: 10,
        url: 'FormServlet', 
        action: 'POST',
        frame:true,
        items: [
             //....
        ],
        buttons: [{
            text: 'Submit',
            handler: function() {
                Ext.Ajax.request({
                    url : 'FormServlet',
                    method:'POST', 
                    params : {
                        yourParam: Ext.encode(form.getValues())
                    },
                    scope : this,
                    //method to call when the request is successful
                    success : this.onLoginSuccess,
                    //method to call when the request is a failure
                    failure : this.onLoginFailure
                });
            }
        }]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone see what is wrong with the code below? For some reason i
When I execute the code below in the simulator I expect to see red
As you can see in the code, I am trying to execute an FQL
I use the below code to connect to my oracle DB and execute a
When I execute the code saveXML below it generates the error above, why?? using
I get the following error when I try and execute the code down below.
The code below works well right now; however, it's serially executed. I'd like to
Please see below my code. I am attempting to bind an array of paramenters
(Using ModX 1.0.5) When I execute my current snippet (see snippet below), it seems
I'm execute a simple mssql query from python. I can see in the profiler

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.