parameters.action in this.ajaxcall

Game development with Board Game Arena Studio
Post Reply
User avatar
pikiou
Posts: 389
Joined: 03 October 2011, 05:36

parameters.action in this.ajaxcall

Post by pikiou »

In this.ajaxcall( url, parameters, obj_callback, callback, callback_error ) if the paramaters object has a property named action, does it affect the ajax call?
It seemed to cause trouble when I tried this:

Code: Select all

this.ajaxcall("/gearnpiston/gearnpiston/chosenBackAlley.html", {action: 'something'}, this, function(result) {}, function(is_error) {});
User avatar
sourisdudesert
Administrateur
Posts: 4630
Joined: 23 January 2010, 22:02

Re: parameters.action in this.ajaxcall

Post by sourisdudesert »

Hello Pikiou,

You are allright. There are some restricted keyword, including "action" and "module". I'm going to list them.

Also: don't forget to use "lock:true" which is a mandatory parameter. Otherwise the interface won't "freeze" and a double clic can send unexpected requests to the server.

Cheers,
User avatar
pikiou
Posts: 389
Joined: 03 October 2011, 05:36

Re: parameters.action in this.ajaxcall

Post by pikiou »

Didn't think about the double click consequence; I'll do it thanks!
Post Reply

Return to “Developers”