0 favourites
  • 6 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • i still can't figure out how to get data from server (maybe cause the client and server are not in the same server!! but i do not know how to handle it)... when i use javascript below it works!!


    but when i use the ajax plugin it return error?? can anyone help me has confused me so much....

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • function get_data(name,value) {$.ajax({

               type : 'get',


               url : 'h..t..t..p..:/../..1..1..',

               data: ''+name+'='+value+'',

               dataType : 'jsonp',

               jsonp: 'jsoncallback',

               success : function(json){alert('sucess!!!'},





  • If you are calling a PHP file through ajax on another host, add somewhere at the top:

    header('Access-Control-Allow-Origin: *');

    This will allow PHP to perform cross domain requests.

  • THANK U! but i still can't understant it... how to add 'header('Access-Control-Allow-Origin: *'); ' and my server file written in python,

       and this is image is in Construt2 <img src="ht_tp://" border="0" />

    it doensn't work

       this is in Javascript test it can get data..<img src="ht_tp://" border="0" />

  • SORRY I'm not allow to submmit URL please remove '_' below and you can see my images



  • For python add:

    self.response.headers['Access-Control-Allow-Origin'] = '*'

    Anywhere in your handler. (within your python script)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)