Found it. Needs to emulate the browser ...

$('#player_comm_input').attr('value', 'toaster').change();

Olivier


On Sun, Apr 19, 2015 at 1:37 PM, Olivier Henley <[email protected]>
wrote:

> Hey! Thank you for the quick answer.
>
> I tried the following:
>
> <-- Gnoga side -->
>
> App.Player_Comm_Form.Create (Parent => App.Player_Area);
> App.Player_Comm_Input.Create (Form  => App.Player_Comm_Form,
>                                                 Value => "nothing",
>                                                 ID    =>
> "player_comm_input");
>
>
> App.Player_Comm_Input.On_Change_Handler(On_Player_Event'Unrestricted_Access);
> App.Player_Comm_Form.Hidden (Value => True);
>
> <-- Javascript side -->
>
> $('#player_comm_input').attr('value', 'toaster');
>
> On_Player_Event is never called. I checked in the DOM, the value of the
> input tag changed for "toaster".
>
> Any idea?
>
> Thx!
>
> Olivier
>
> On Sat, Apr 18, 2015 at 11:17 PM, Rabbi David Botton <[email protected]>
> wrote:
>
>> You would need to use the same internal messaging protocol used by Gnoga
>> to do it the way you mentioned. While possible, a simple solution is to
>> create a hidden field and bind the On_Change event to that field in Gnoga.
>> Then in your JS every time you change the hidden field's value it will
>> trigger your handler on the Gnoga side.
>>
>> David Botton
>>
>>
>> On Sat, Apr 18, 2015 at 9:27 PM Olivier Henley <[email protected]>
>> wrote:
>>
>>> Hi,
>>>
>>> I try to use the youtube iframe API (
>>> https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player)
>>> and I'm hitting a wall trying to communicate events from browser to server
>>> that are not binded to a html element.
>>>
>>> When instantiating a Youtube player, you specify a callback that will be
>>> called once the player is ready : onPlayerReady(event)
>>>
>>> I want to forward that event to the server so I can react accordingly. I
>>> tried the following in boot.js:
>>>
>>> function onPlayerReady(event) {
>>>         ws.send("test");
>>> }
>>>
>>> On the server side I binded a on_message_handler on the main window but
>>> no luck, the server output a Dispatch Message Error followed by a
>>> CONSTRAINT_ERROR - bad input for 'Value: "" to stdout everytime I send the
>>> test string through the websocket.
>>>
>>> I checked in the code for those outputted keywords but did not find
>>> anything. (Still not sure how to do a full blown search in GPS yet ;)
>>>
>>> Any help would be appreciated.
>>>
>>> Thank you very much!
>>>
>>> Olivier
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
>>> Develop your own process in accordance with the BPMN 2 standard
>>> Learn Process modeling best practices with Bonita BPM through live
>>> exercises
>>> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual-
>>> event?utm_
>>>
>>> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF_______________________________________________
>>> Gnoga-list mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/gnoga-list
>>>
>>
>
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Gnoga-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gnoga-list

Reply via email to