Skip to Content
avatar image
Former Member

Issue with Tiny World part9 : Application life cycle

I am following the Tiny world Tutorial had issue on this part of the tutorial :

I am having a problem adding the country.The response is always: {“readyState”:0,”status”:0,”statusText”:”error”}

and in the console I get this message:

” Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. ”

Also can you specifiy what url to use in the ajax url ?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Feb 27, 2018 at 11:23 AM

    Hi Roshan,

    The URL should be this:


    Here is the full ajax post request:

    type: "POST",
    url: "country/country.xsjs",
    contentType: "application/json", data: insertdata, dataType: "json", crossDomain: true,	success: function(data) {
    alert("Data inserted successfully");
    error: function(data) {	
    var message = JSON.stringify(data);

    Make sure you also make the needed changes to the country.xsjs code.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank You, Uri
      It worked. I was just using the wrong table name in country.xsjs file which was causing the problem