Re: Populating a combobox

16 views
Skip to first unread message

Andrew Clark

unread,
Oct 15, 2012, 4:18:22 PM10/15/12
to rr...@googlegroups.com
I actually got a reply to this on stackoverflow but I really should also have asked for the method of obtaining a selected value from a dropdown
I have played around with using jquery but am a bit lost and could do with some guidance
thanks

On Saturday, 13 October 2012 10:19:46 UTC-7, Andrew Clark wrote:
Hi
  I am looking to amend the helloworld example which currently takes a text input

res$write('<input type="text" name="friend">\n') 

To a combobox equivalent for selection

res$write('<input type="dropdown" name="friend">\n')

populated by an R vector say

myFriends <- c("Justin","Niki","Adolph")

How would I go about this?

cheers

Sven Hartenstein

unread,
Oct 16, 2012, 12:48:11 PM10/16/12
to rr...@googlegroups.com
Hi Andrew,

> I really should also have asked for the method of obtaining a
> selected value from a dropdown

req$POST()[["friend"]] gives you the posted value (on the next page
after form is submitted).

Sven

Reply all
Reply to author
Forward
0 new messages