Link to app.r from action buttons.

13 views
Skip to first unread message

Mr. Scotchpie

unread,
Feb 21, 2018, 4:34:11 AM2/21/18
to Shiny - Web Framework for R
Hi

I have a simple landing page in Shiny.  The page consists of two action buttons that link to two shiny dahboards.  My directory structure is a landing page directory containing app.r for the landing page and the two dashboard project directories.

My code for the action buttons is:
fluidRow(column(width = 6,
                             div(align="right",
                                   actionButton(inputId='ab1', label="Dashboard One",
                                                        width = "150px",
                                                        icon = icon("th"),
                                                        onclick ="window.open('dashboard_1/', '_blank')"))
                ),
                column(width = 6,
                             div(align="left",
                                   actionButton(inputId='ab2', label="Dashboard Two",
                                                         width = "150px",
                                                          icon = icon("th"),
                                                          onclick ="window.open('dashboard_2/', '_blank')"))
                )
)


The thing is, even when using full paths to the two dashboard directories, when inside the landing page directory the dashboards do not load ("Not Found" in the browser tab though the url is correct).  When outside the landing page directory they load fine.  Why is this? 

I would like the dashboard directories inside the landing page directory to keep projects together.  I have chmod 777 all the directories and files but still to no affect.  The dashboards only load when outside the landing page directory.

Cheers
Andrew
Reply all
Reply to author
Forward
0 new messages