ebailey78 / shinyBS

Twitter Bootstrap Components for Shiny
182 stars 47 forks source link

Modals triggered by non-user interaction #5

Closed TonyDIRL closed 10 years ago

TonyDIRL commented 10 years ago

Hi,

Great package - really like the range of buttons and modal feature.

Is it possible to have a modal trigger off non-user interaction?

For example, I would like to have a modal trigger after a reactivepoll has returned or an invalidateLater timer has expired.

I attempted to use the updateButton callback which triggers the modal but with no success. I believe the code `$('#myModal').modal('show');`` will achieve what I want but I'm not sure how to implement this within shiny.

Cheers

ebailey78 commented 10 years ago

Thanks! There is a function, toggleModal(), which should open a modal it if is closed. You should be able to call it from anywhere within your server.R script. If that doesn't work, let me know and I will look into it more.

TonyDIRL commented 10 years ago

Yes, that worked, thank you