0

I an trying to simply append a div from the server file using the below code

    HTML("content-id",div("title", "Hello"), add = TRUE)

but it keeps returning

    [object Object]

Is there anything i can do to fix this? I've tried using

     HTML("content-id",tags$div("title", "Hello"), add = TRUE)

but the effect is the same. Any help would be great. Thank you!

joe-gz
  • 165
  • 1
  • 3
  • 12

1 Answers1

0

nvm, figured it out i think!

    shinyjs::html("content-id",as.character(tags$div("title", "Hello"), add = TRUE))
joe-gz
  • 165
  • 1
  • 3
  • 12
  • If what you're trying to do is CHANGE the HTML of a specific element, then yes that's the correct function, from my shinyjs package. The HTML function is from shiny (or perhaps htmltools?) and has a completely different usage -- it's used to mark a piece of code as HTML instead of plain text – DeanAttali Sep 23 '16 at 23:49
  • yea, thanks for your comment! i realize my question is talking about two separate functions, and i did not make that clear.. I really appreciate the help! – joe-gz Sep 26 '16 at 20:39