JS noob here. I want to load a text file when a TextInput widget value changes, and display it in a Div widget. Below was what I was hoping to do (i.e. my naive use of jQuery load directly on the div object, which doesn’t work). What’s the best way to load a text file and update a Div with the contents, in a callback of a widget?
cb = CustomJS(args=dict(div=div),code="""
div.load( cb_obj.value + ‘/myfile.log’);
“”")
directory.js_on_change(‘value’,cb)
from bokeh.models.widgets import TextInput,Div
from bokeh.models import CustomJS
directory = TextInput(title=“Data directory”,value="~/")
div = Div(width=100)
``

