Page 1 of 1

options in javascript

Posted: 24 June 2020, 09:47
by Emanuele Ornella
Is there a way to get the options in javascript?

From here: http://en.doc.boardgamearena.com/Game_o ... ns.inc.php

it is indicated how to get in php: $this->gamestate->table_globals[100]

but not how to get in javascript.

There is a way for preferences:

this.prefs[100].value

but what about options?
this.options[100].value does not work...

Thx,
Ema

Re: options in javascript

Posted: 24 June 2020, 09:56
by Emanuele Ornella
Ok, never mind..
I am passing:

$result['roundwinner'] = $this->gamestate->table_globals[100];

from getAllDatas

and getting it from javascript as

this.gamedatas.roundwinner

So sorted.
Ema

Re: options in javascript

Posted: 27 June 2020, 19:33
by Inaofr
I'm doing the same. I don't know another way.
You should edit your first post to add [SOLVED] in front of the title.