1

I have this shiny app, with an wordcloud. I need that when the user clicks on the word it opens a new url. I've managed to get to the word when the user click on it and update the query string.

Here's what i've done:

  observe({

if (!is.null(input$selected_word))
{
  querystring <- paste("?lookfor=",gsub(":.*","",isolate(input$selected_word)),sep="")
  updateQueryString(querystring, mode = c("replace","push"),
                    session = getDefaultReactiveDomain())
}

else { }

  })

The problem is that this shiny app is inside an iframe, and it reloads itself. I needed to redirect to the main website, for example: www.mywebsite.com/?lookfor=word

How to do so?

Lucca Ramalho
  • 573
  • 1
  • 6
  • 16
  • Did you find any solution to your problem? – Holger Brandl Sep 02 '19 at 10:52
  • Hello there! Kind of. I've managed to update to the main website, but the action only occurs after clicking on a second word inside the wordcloud. If you want me to i can show you the code – Lucca Ramalho Sep 03 '19 at 12:41
  • Thanks for coming back. I've asked a similar question (covering my use case better) under https://stackoverflow.com/questions/57755830/how-to-redirect-to-a-dynamic-url-in-shiny and got a prompt and working answer. – Holger Brandl Sep 03 '19 at 20:19

0 Answers0