AJAX Call using Enyo Framework -


I am trying to make an AJAX call using the framework and I am running with a problem. The error message I am getting is 0.. It's just a 0. I'm sure the link to my Jason file was correct and I made this JSField to test it. Any help is greatly appreciated. My host is GoDaddy and I have ensured that I have added the Jason extension right in my web conference, the link to the Json file is correct and it gives a valid json I checked it using jsonlint as it looks like on JSField ({Name: "Ajax sample", component: [{type: "button", content: "get users", ontop: "fetch"}, { Name: "repos", Content: "Not loaded ...", Allow HTML: Ajax.response (this, "gotResponse"); ajax.Terror (this, This tag);}, found response: function (inner, interspace) {var output = ""; (i = 0 for; i ";} Output + = Date. Now (); $. Repos.setContent (Output);}, Found Error: Function (Inner, Inner) {Warning (Inner); $. Repos.setContent (Inner + + "+ Date. Now ());}

});

A Corace problem Or it looks like I see the following in the console:

No 'access-control-permission-origin' header exists on the requested resource. Originally access to fiddle.jshell.net is not allowed.

I wrapped it successfully as a jsonp request. <{ "Button", Content: "Get Users", OnTap: "Fetch"}, {name: "repos", content: "not loaded ...", allowHTML: true}], fetch: function {var ajax = new enyo.JsonpRequest ({url: Http://jsonpwrapper.com/?urls%5B%5D=http%3A%2F%2Fatxapps.com%2F_sites%2Fatxapps Com% 2Fdev% 2Fjetstream% 2Fassets% 2FdataUsers.json "}); ajax.go (); ajax .response (this, "getResponse"); Ajax terror (this, this. Tag);}, found response: function (Inorder, InResponse) {var output = ""; var body = enyo.json.parse (inResponse [ 0] .body); // jsonpwrapper.com each Wrap the result in an array with an index for the URL. The actual data is that body of that index is the ultimate but at least (in this example) (i = 0; i & lt; physical length; i ++) { Output + = body [ii] .iid + "
output = = date.Nan ();. $ Repos.setContent (output).}, Found error: function (in -Senders, Insurrers) {Warning (Inspiration); This $ Repos.setContent (inError + + Date.now ()); }});

If you are running it on the same server in prod, you will not see the error (because it is not cross-root). If it is on a different server, you can convert server-side to support jsonp either.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -