2

I have a game finished and I´m saving the scores in a database perfectly, only if I use webview+, if I change to canvas+ the save proccess is not working (and no errors).

I´m trying to save this data sending it to a php file connected to de database (as I said, is working using webview or webview+)

How would you do this using canvas+?

var http = new XMLHttpRequest();
var url = path+"getScores.php";
var params = "game=1&order=ASC";
http.open("POST", url, true);

http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.setRequestHeader("Content-length", params.length);
http.setRequestHeader("Connection", "close");
http.onreadystatechange = function() {
    if(http.readyState == 4 && http.status == 200) {
        alert(http.responseText);
    }
}
http.send(params);
Pizzaboy
  • 331
  • 2
  • 14

2 Answers2

1

Please, try passing the parameters in the request URL using a GET (just in case). Also, try compiling a custom launcher in the cloud using the latest version (2.1.1). Actually, the JQuery errors should disappear by doing this.

  • Kaixo Iker, i sent the items with GET before, the POST is just because I was trying some stuff... anyway, where can I create a custom launcher? I´m not finding anything at all... mila esker. – Pizzaboy Jun 23 '15 at 10:02
  • And I test with a custom launcher and everthing is working perfectly :) THANKS. – Pizzaboy Jun 23 '15 at 10:39
1

And as Iker said, you can fix this with a custom launcher. I didn´t know about this thing but well, it´s working perfectly now, so if you have this problem, just try that and good luck.

Pizzaboy
  • 331
  • 2
  • 14