Hi,
is there any way to access and change button attribute (e.g. name) from CustomJs code? Only solution I’ve found is to send ajax put request. But I need URL for it. In general
window.location.pathname
``
works but I have my widget on Jupyter Notebook and window.location.pathname returns me URL of notebook. So is there any way to get URL of “session” with widget in CustomJs code?
Thanks.
Yes. You can pass the button to CustomJS as part it’s args argument and then access it inside the CustomJS javascript code. (more info at the user guide documentation).
On Wed, Oct 21, 2015 at 11:22 AM, Michael Skotnica [email protected] wrote:
Hi,
is there any way to access and change button attribute (e.g. name) from CustomJs code? Only solution I’ve found is to send ajax put request. But I need URL for it. In general
window.location.pathname
``
works but I have my widget on Jupyter Notebook and window.location.pathname returns me URL of notebook. So is there any way to get URL of “session” with widget in CustomJs code?
Thanks.
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
Hi Fabio,
thank you for your help. It works if the button is part of arg. But now I need to handle that change in Python code (button.on_change(…)).
Bokeh.$(‘#button_id’).change();
``
does not work. It works with textinput but not with button. How can I do that?
Thanks
Dne středa 21. října 2015 19:48:02 UTC+2 Fabio Pliger napsal(a):
···
Hi,
Yes. You can pass the button to CustomJS as part it’s args argument and then access it inside the CustomJS javascript code. (more info at the user guide documentation).
On Wed, Oct 21, 2015 at 11:22 AM, Michael Skotnica [email protected] wrote:
Hi,
is there any way to access and change button attribute (e.g. name) from CustomJs code? Only solution I’ve found is to send ajax put request. But I need URL for it. In general
window.location.pathname
``
works but I have my widget on Jupyter Notebook and window.location.pathname returns me URL of notebook. So is there any way to get URL of “session” with widget in CustomJs code?
Thanks.
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
Now I’m quite confused about what your use case. Are you using bokeh-server, CustomJS or both? How? Can you provide some more context? Also a code example would help too…
Cheers
Fabio
···
On Thu, Oct 22, 2015 at 10:20 AM, Michael Skotnica [email protected] wrote:
Hi Fabio,
thank you for your help. It works if the button is part of arg. But now I need to handle that change in Python code (button.on_change(…)).
Bokeh.$(‘#button_id’).change();
``
does not work. It works with textinput but not with button. How can I do that?
Thanks
Dne středa 21. října 2015 19:48:02 UTC+2 Fabio Pliger napsal(a):
Hi,
Yes. You can pass the button to CustomJS as part it’s args argument and then access it inside the CustomJS javascript code. (more info at the user guide documentation).
On Wed, Oct 21, 2015 at 11:22 AM, Michael Skotnica [email protected] wrote:
Hi,
is there any way to access and change button attribute (e.g. name) from CustomJs code? Only solution I’ve found is to send ajax put request. But I need URL for it. In general
window.location.pathname
``
works but I have my widget on Jupyter Notebook and window.location.pathname returns me URL of notebook. So is there any way to get URL of “session” with widget in CustomJs code?
Thanks.
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
Hi,
I’m using Bokeh-server and tap tool. And I need to recognize which coordinates I click on and send that on my Python “app-server” then compute something and send output “back to browser”. So I’m using CustomJs code for tap tool. In JS code I send coordinates through the button attribute “name” (via ajax put request which does not work in Jupyter notebook cause bad URL). In Python code I have button.on_change function which gets coordinates of click. It’s quite weird but I didn’t find another solution.