session$sendCustomMessage inputs question

237 views
Skip to first unread message

Amanda Traud

unread,
Sep 23, 2014, 4:03:09 PM9/23/14
to shiny-...@googlegroups.com
If I use the session$sendCustomMessage command in my server file and input a list of three things, how do I access the three different things in my message-handler.js file?

Say my call looks like this:

session$sendCustomMessage(type='testmessage', message=list(pid=pid, cid=cid, query=sql))  

In my .js file I want to use pid, cid and query seperately, any ideas on how I do that?

Thanks!!

Joe Cheng

unread,
Sep 24, 2014, 4:47:56 AM9/24/14
to Amanda Traud, shiny-...@googlegroups.com
The object that's passed to your JS message handler will be an object with those members; you can call message.pid, message.cid, and message.query.

--
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/d5545afa-861f-44ab-94f4-42e8ff1bd708%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages