Dasat's Recent Forum Activity

  • Yann, I've handled access origin. I fugured out the problem was with my content type header. Its form instead of Json. I tried using ajax set header to set the content type to app/Jason, but its like its appending it so I get something like content type: xxx-form blabla,application/Json. I posted this on the how do I forum butbim yet to get any help. So my server keeps returning bad request, which implies it knows the data coming is Jason but the header says its form. That is what I need to fix now:the ajax set header action!! Thanks for all the help.

    Dasat

    Well to debug your problem you have a lot of options:

    - you can print the resulting string by inserting the browser plugin and in the action Browser: log(JSON.AsJson(0)) Then you can copy paste the result in http://jsonlint.com/ to see if the json is valid

    - you can check if the javascript console gives any error like the famous [quote:r0tn3ua6]XMLHttpRequest cannot load http://scirra.com/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://www.google.com' is therefore not allowed access.

    whose solution is to either host your game on the same server you are querying, or, make the server send the Access-Control-Allow-Origin: * header

    • you can check your own server side code to se if everything is ok

    And well, if the problem persist, give more detail.

    What would you do if a friend was asking for help on an arithmetic problem without showing you the actual problem? <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy"> (considering you have enough arithmetic knowledge, but that's not the point here)

  • Bump

  • I'm currently trying to pass a json data, and i want to change my ajax request header to application/json. This is waht i keep getting on my server Content-Type: application/x-www-form-urlencoded, application/json.

    I used the ajax action of set request header, but it seems to be appending or so. How do i fix this, i only want the application/json, because django is still seeing it as a form

  • brunopf, were you able to find a way aroun thism i found out the ajax, action set request header is suppose to do this, but mine keeps sending application/x-www-form-urlencoded,application/json. I need to get rid of the x-www part. any ideas

    Hello,

    I am developing an educational game which consists in both the game and a web platform for the teachers to register new questions and have feedback from the students.

    I am trying to send the data from the in-game (user registering form) to the rails application using JSON & AJAX. My problem is that rails needs the post request with the content-type headers as JSON, which is not possible natively in construct 2.

    Is there any alternative AJAX plugin that let me change the headers content? Any other solution?

    I appreciate any help.

    Thanks

  • Yann, please i'm trying to pass the data in my json object to a database using ajax post, what would be data format be, i used "data="&Json.Asjson(0), but i keep getting error, am I wrong?

  • caiorosisca, I'll try it out, thanks. But i guess it should work, with some other ideas i can input

    I,ve never used this lists but my Idea would be to spawn/update a list depending on what your mouse cursor is above. Like on your second image, Mouse is over NavigationItem3 on dropdown1, so have your dropdownlist2 set to visible(or spawn it), update its position to navigationItem3Y and navigationItem3+navitaionItem.width, update it's values accordingly. Hardest part would be preparing all the values, you can use arrays and a xml/json file with all the info.

  • Bump

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could also right click on your layout and choose edit event sheet

  • Please, how do i achieve this type of multiselection as shown in the attachments.

    I want the user to be able to select more than one option, and note that each option has some children that should be displayed. Also the number of options is dynamic. Not necessarily 5 through out, it could change depending on a variable.

  • shes a miss!!

    Dasat

    Glad to help sir

  • no response yet?

    megatronx have you found a way around this?

    Hello,

    Is there a way - is it possible to have nested lists in the list box?

    Thanks!

  • Yann, Thanks a lot, the array illustration made using the plugin very easy and i've been able to implement that in my work. Moving on to the next stage now. Thanks once again.

    Dasat

    is this working for you?

    https://dl.dropboxusercontent.com/u/23551572/C2/plugins/json/demo/arithmeticTables.capx

Dasat's avatar

Dasat

Member since 14 Apr, 2013

None one is following Dasat yet!

Connect with Dasat

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies