Trying to open a new webpage by clicking the actionButton in Shiny

3,513 views
Skip to first unread message

jhu...@stevens.edu

unread,
Jan 15, 2015, 5:54:32 PM1/15/15
to shiny-...@googlegroups.com

Hello,

Is there anyone who happen to know how to open a new webpage by triggering the action button when executing the Shiny App in server? 

Since I have several Shiny Apps, ideally, I'd like to build a welcome page with several button, which could redir the users to those Apps.

Thank you!

Joe Cheng

unread,
Jan 15, 2015, 6:32:13 PM1/15/15
to jhu...@stevens.edu, shiny-...@googlegroups.com
You don't need to use actionButton, just make an HTML <a> tag right in your ui.R:

tags$a(class="btn btn-default", href="{url}", "{description}")

I wasn't sure from your question whether you wanted it in a new window, if so then also include target="_blank" as an argument.

--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/4f5c8312-be07-4185-9f7d-db6e86880c4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jhu...@stevens.edu

unread,
Jan 16, 2015, 5:26:21 PM1/16/15
to shiny-...@googlegroups.com, jhu...@stevens.edu
Thank you, Joe. That's very helpful. 

Finally, I made my code like:

shinyUI(
           HTML('<a href = ........><button style = "height:70px;width:100px"></button></a>)).

It's a nice discuss place. I alway get great insights from your guys help. 

Thanks again!

nasim

unread,
Oct 15, 2015, 5:30:27 PM10/15/15
to Shiny - Web Framework for R, jhu...@stevens.edu
Hello,

I am trying to open a shiny app B from another shiny app A by clicking a button and I also want to send a dataframe to app B as input. Is it possible?
I appreciate your help.

Thanks,
Reply all
Reply to author
Forward
0 new messages