☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

How to add callback/listner on textInput object (bokeh)?

Community Support
wu.tianchen2015
wu.tianchen2015

I have added a text input into my current document to parameterize one underlying sql query of mine through

textInput = TextInput(title=“query_parameters”, name=‘id’, value=‘my sine wave’)

curdoc().add(textInput)

how can I attach a listener/callback function to this textInput widget in current document ?

⌁   Link to post
Bryan
Bryan

More information is needed. If you are using the (new) Bokeh server in the latest dev builds, you can follow this example, for instance:

  https://github.com/bokeh/bokeh/blob/master/examples/app/sliders.py

If you are not using a Bokeh server, thenn there is no way to run python callbacks. You are limited to JavaScript callbacks (which could certainly make an AJAX or REST API call), since in that case everything is running in the browser. These are described in the user's guide:

  Interaction — Bokeh 3.3.2 Documentation

And there are several additional examples under the "examples" folder in the GH repository as well.

Bryan

···

On Dec 7, 2015, at 6:50 AM, wu.tianchen2015@gmail.com wrote:

I have added a text input into my current document to parameterize one underlying sql query of mine through

    textInput = TextInput(title="query_parameters", name='id', value='my sine wave')

    curdoc().add(textInput)

how can I attach a listener/callback function to this textInput widget in current document ?

--
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 bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/92944e60-f1fa-4f6d-8f52-e7f285c28dcc%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post

End of archived discussion · Replies are disabled