Passing variable from popup dialog to bokeh/ python variable

Hi,

While developing one dashboard applications, I have encountered some bottle-necks of using bokeh-server.

  • In my application I have a jquery popup with html form having elements like textbox, dropdown, radio button etc. On submit this , I would like to get the values of these elements in bokeh/ python variable for further processing. Is there anyway I can do it? I have tried the followings:
    I have created a TextInput with a optional name attribute ie ti = textinput(value="", title=“label1”, name=“ti”). Then I can able to set the value of this TextInput from popup

through $(‘input[name=ti]’).value. But it seems that this value is not available by t1.value() from bokeh/ python unless there is a change events occurs in the TextInput box. I

tried to trigger the onChange event on the TextInput from jquery/ Javascript but it did not work.

  • Is there any way, I can set the text of a Div or Paragraph widget?
  • Is there any timepicker also like datepicker?

Any help/ suggestions will be highly appreciated.

Regards,

Sandip

The way I do this is by sending a request to the back end from the front end with the value as a part of the request.

···

On Friday, August 26, 2016 at 1:13:16 PM UTC-4, Sandip Sadhukhan wrote:

Hi,

While developing one dashboard applications, I have encountered some bottle-necks of using bokeh-server.

  • In my application I have a jquery popup with html form having elements like textbox, dropdown, radio button etc. On submit this , I would like to get the values of these elements in bokeh/ python variable for further processing. Is there anyway I can do it? I have tried the followings:
    I have created a TextInput with a optional name attribute ie ti = textinput(value="", title=“label1”, name=“ti”). Then I can able to set the value of this TextInput from popup

through $(‘input[name=ti]’).value. But it seems that this value is not available by t1.value() from bokeh/ python unless there is a change events occurs in the TextInput box. I

tried to trigger the onChange event on the TextInput from jquery/ Javascript but it did not work.

  • Is there any way, I can set the text of a Div or Paragraph widget?
  • Is there any timepicker also like datepicker?

Any help/ suggestions will be highly appreciated.

Regards,

Sandip

Reuben,

Can you please explain a little bit?

···

On Friday, 26 August 2016 23:08:47 UTC+5:30, Reuben Jacobs wrote:

The way I do this is by sending a request to the back end from the front end with the value as a part of the request.

On Friday, August 26, 2016 at 1:13:16 PM UTC-4, Sandip Sadhukhan wrote:

Hi,

While developing one dashboard applications, I have encountered some bottle-necks of using bokeh-server.

  • In my application I have a jquery popup with html form having elements like textbox, dropdown, radio button etc. On submit this , I would like to get the values of these elements in bokeh/ python variable for further processing. Is there anyway I can do it? I have tried the followings:
    I have created a TextInput with a optional name attribute ie ti = textinput(value="", title=“label1”, name=“ti”). Then I can able to set the value of this TextInput from popup

through $(‘input[name=ti]’).value. But it seems that this value is not available by t1.value() from bokeh/ python unless there is a change events occurs in the TextInput box. I

tried to trigger the onChange event on the TextInput from jquery/ Javascript but it did not work.

  • Is there any way, I can set the text of a Div or Paragraph widget?
  • Is there any timepicker also like datepicker?

Any help/ suggestions will be highly appreciated.

Regards,

Sandip

Sure. Unfortunately I am not using Bokeh server I am and am using Flask, but what I normally do is have the user enter in a piece of information like a date range. After the user confirms their date range, I make a POST request to my server. This request contains that date range the user specified in the front end as JSON. After receiving the date range my back end then processes that date range, formats my data based on the specified date range, creates a bokeh chart, and serves that chart to the front end (in the form of a div and JS) as a part of the response of the original request.

···

On Friday, August 26, 2016 at 1:51:32 PM UTC-4, Sandip Sadhukhan wrote:

Reuben,

Can you please explain a little bit?

On Friday, 26 August 2016 23:08:47 UTC+5:30, Reuben Jacobs wrote:

The way I do this is by sending a request to the back end from the front end with the value as a part of the request.

On Friday, August 26, 2016 at 1:13:16 PM UTC-4, Sandip Sadhukhan wrote:

Hi,

While developing one dashboard applications, I have encountered some bottle-necks of using bokeh-server.

  • In my application I have a jquery popup with html form having elements like textbox, dropdown, radio button etc. On submit this , I would like to get the values of these elements in bokeh/ python variable for further processing. Is there anyway I can do it? I have tried the followings:
    I have created a TextInput with a optional name attribute ie ti = textinput(value="", title=“label1”, name=“ti”). Then I can able to set the value of this TextInput from popup

through $(‘input[name=ti]’).value. But it seems that this value is not available by t1.value() from bokeh/ python unless there is a change events occurs in the TextInput box. I

tried to trigger the onChange event on the TextInput from jquery/ Javascript but it did not work.

  • Is there any way, I can set the text of a Div or Paragraph widget?
  • Is there any timepicker also like datepicker?

Any help/ suggestions will be highly appreciated.

Regards,

Sandip

Thanks for your suggestions.

···

On Friday, 26 August 2016 23:24:51 UTC+5:30, Reuben Jacobs wrote:

Sure. Unfortunately I am not using Bokeh server I am and am using Flask, but what I normally do is have the user enter in a piece of information like a date range. After the user confirms their date range, I make a POST request to my server. This request contains that date range the user specified in the front end as JSON. After receiving the date range my back end then processes that date range, formats my data based on the specified date range, creates a bokeh chart, and serves that chart to the front end (in the form of a div and JS) as a part of the response of the original request.

On Friday, August 26, 2016 at 1:51:32 PM UTC-4, Sandip Sadhukhan wrote:

Reuben,

Can you please explain a little bit?

On Friday, 26 August 2016 23:08:47 UTC+5:30, Reuben Jacobs wrote:

The way I do this is by sending a request to the back end from the front end with the value as a part of the request.

On Friday, August 26, 2016 at 1:13:16 PM UTC-4, Sandip Sadhukhan wrote:

Hi,

While developing one dashboard applications, I have encountered some bottle-necks of using bokeh-server.

  • In my application I have a jquery popup with html form having elements like textbox, dropdown, radio button etc. On submit this , I would like to get the values of these elements in bokeh/ python variable for further processing. Is there anyway I can do it? I have tried the followings:
    I have created a TextInput with a optional name attribute ie ti = textinput(value="", title=“label1”, name=“ti”). Then I can able to set the value of this TextInput from popup

through $(‘input[name=ti]’).value. But it seems that this value is not available by t1.value() from bokeh/ python unless there is a change events occurs in the TextInput box. I

tried to trigger the onChange event on the TextInput from jquery/ Javascript but it did not work.

  • Is there any way, I can set the text of a Div or Paragraph widget?
  • Is there any timepicker also like datepicker?

Any help/ suggestions will be highly appreciated.

Regards,

Sandip

Bokeh developer/ Bokeh server users,

Can you please suggest how to do these which seems very straight forward?

Regards,

Sandip

···

On Friday, 26 August 2016 22:43:16 UTC+5:30, Sandip Sadhukhan wrote:

Hi,

While developing one dashboard applications, I have encountered some bottle-necks of using bokeh-server.

  • In my application I have a jquery popup with html form having elements like textbox, dropdown, radio button etc. On submit this , I would like to get the values of these elements in bokeh/ python variable for further processing. Is there anyway I can do it? I have tried the followings:
    I have created a TextInput with a optional name attribute ie ti = textinput(value="", title=“label1”, name=“ti”). Then I can able to set the value of this TextInput from popup

through $(‘input[name=ti]’).value. But it seems that this value is not available by t1.value() from bokeh/ python unless there is a change events occurs in the TextInput box. I

tried to trigger the onChange event on the TextInput from jquery/ Javascript but it did not work.

  • Is there any way, I can set the text of a Div or Paragraph widget?
  • Is there any timepicker also like datepicker?

Any help/ suggestions will be highly appreciated.

Regards,

Sandip

You may also be able to use Python within an HTML template here to your advantage, but I do not have too much experience doing that.

···

On Tuesday, August 30, 2016 at 12:05:13 AM UTC-4, Sandip Sadhukhan wrote:

Thanks for your suggestions.

On Friday, 26 August 2016 23:24:51 UTC+5:30, Reuben Jacobs wrote:

Sure. Unfortunately I am not using Bokeh server I am and am using Flask, but what I normally do is have the user enter in a piece of information like a date range. After the user confirms their date range, I make a POST request to my server. This request contains that date range the user specified in the front end as JSON. After receiving the date range my back end then processes that date range, formats my data based on the specified date range, creates a bokeh chart, and serves that chart to the front end (in the form of a div and JS) as a part of the response of the original request.

On Friday, August 26, 2016 at 1:51:32 PM UTC-4, Sandip Sadhukhan wrote:

Reuben,

Can you please explain a little bit?

On Friday, 26 August 2016 23:08:47 UTC+5:30, Reuben Jacobs wrote:

The way I do this is by sending a request to the back end from the front end with the value as a part of the request.

On Friday, August 26, 2016 at 1:13:16 PM UTC-4, Sandip Sadhukhan wrote:

Hi,

While developing one dashboard applications, I have encountered some bottle-necks of using bokeh-server.

  • In my application I have a jquery popup with html form having elements like textbox, dropdown, radio button etc. On submit this , I would like to get the values of these elements in bokeh/ python variable for further processing. Is there anyway I can do it? I have tried the followings:
    I have created a TextInput with a optional name attribute ie ti = textinput(value="", title=“label1”, name=“ti”). Then I can able to set the value of this TextInput from popup

through $(‘input[name=ti]’).value. But it seems that this value is not available by t1.value() from bokeh/ python unless there is a change events occurs in the TextInput box. I

tried to trigger the onChange event on the TextInput from jquery/ Javascript but it did not work.

  • Is there any way, I can set the text of a Div or Paragraph widget?
  • Is there any timepicker also like datepicker?

Any help/ suggestions will be highly appreciated.

Regards,

Sandip