This page last changed on May 04, 2011 by nina.revko@involver.com.

Can submit answers to a poll or display the results.

sml.tag.Poll.respond(userId, pollId, optionIndex, onSuccess)

Responds to a poll and calls an onSuccess function (typically used to display results). 

name type description
userId integer identifies what user is casting the vote.  FB User ID is a good choice.
pollId integer identifies this particular poll question
optionIndex integer identifies the user's answer
onSuccess function callback function, received rendered results as an argument

sml.tag.Poll().showResults(pollId)

Shows a dialog with the results of a poll without submitting an answer.

name type description
pollId integer identifies this particular poll

Example can be found in poll feature tag with "Poll with View Results link but otherwise like the default layout."

Document generated by Confluence on Feb 12, 2013 09:09