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 8173235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T22:04:16+00:00 2026-06-06T22:04:16+00:00

I want to load the form fields using json data. I am using extjs

  • 0

I want to load the form fields using json data.
I am using extjs 4.1 for ui and asp.net webapi to fetch the data.
My objective is to load the data and bind it to the field dynamically which form.load is used for if the name of field corresponds to the data.fieldnameproperty.

i have taken the below link as reference :
Ext JS: FormPanel not populating fields with JSON data

It loads the data if the Webapi is on the same project :
i.e.
projectname:
–ui folder
— webapi controller folder

but in my case the data is coming from different domain 2 different project for ui and webapi. My form.load code is as below

formCmp.getForm().load({
    url: 'http://localhost/WebApiCore/api/Values/',
    method: 'GET',
    headers: {'Content-type': 'application/json'},
// params: {
//          empId: '111'
//         },
    success: function (form, action) {
        console.log(action.result);
        //Ext.Msg.alert("Load success", action.result);
    },
    failure: function (form, action) {
        //Ext.Msg.alert("Load failed", action.result.errorMessage);
    }
    });

I get the error as “NetworkError: 405 Method Not Allowed – “http://localhost/WebApiCore/api/Values/?_dc=1340261175475” in firebug.

my project is running on “http://localhost:54118/PreHospital.htm“

I am not sure is it the problem of extjs not sending the cross domain request using form.load or the problem with webapi doesn’t allow cross domain request.

I am not sure how to set extjs to send the jsonp request using form.load.

any kind of help is appreciated.

  • 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-06T22:04:17+00:00Added an answer on June 6, 2026 at 10:04 pm

    If you just have regular form fields on your Ext Form, it will actually do an AJAX call to submit this data. I don’t think there is a way to force a form.load to do a JSONP request. You will probably need to do a manual JSONP request like you would a manual AJAX request.

            Ext.data.JsonP.request({
                url         : websiteURL,
                scope       : this,
                params      : {
                    empId: '111'
                },
                success     : function(jsonData) {
    
                },
                failure     : function(jsonData) {
                    Ext.Msg.show({
                        title   : 'Warning',
                        msg     : message,
                        buttons : Ext.Msg.OK,
                        icon    : Ext.Msg.WARNING
                    });
               }
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to load data from MySql database to a HTTP form When I
I have a form with a DataGridView and I want to load data from
I'm using ASP.Net/C# and I have a form that allows people to add information
I want to run a console application (eg app.exe) from a windows form load
Hi I want to set opacity for a form in page load. I try
I am using jquery validation plugin to validate my form. I have one field
I'm using an iframe to display a website next to a form. I want
I have an asp.net-mvc site. I have a page with a grid of data
I'm using a wordpress plugin shorttag which needs one field to load through a
I using a reCaptcha on my web page under asp.net mvc. This web site

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.