You need jQuery for this example. This example uses the extension t3jquery. The jQuery code and design of this example is from here: http://net.tutsplus.com/demos/test_poll/ http://net.tutsplus.com/tutorials/javascript-ajax/creating-a-dynamic-poll-with-jquery-and-php/ Test it with this TypoScript (without the first 3 lines if you always integrate jQuery):
includeLibs.t3jquery = EXT:t3jquery/class.tx_t3jquery.php page.11 = USER page.11.userFunc = tx_t3jquery->addJqJS plugin.tx_myquizpoll_pi1 { isPoll = 1 templateFile = EXT:myquizpoll/examples/template_rating_jquery.html tableAnswers = tx_myquizpoll_voting } plugin.tx_myquizpoll_pi1.myVars.answers { input_id = 1 input_label = 1 } plugin.tx_myquizpoll_pi1.rating { extKey = tx_ttnews parameter = tt_news }Or with:
plugin.tx_myquizpoll_pi1.rating { extKey = parameter = id }Or with:
plugin.tx_myquizpoll_pi1.rating { extKey = parameter = }
Note: no breaks allowed in the question. Breaks: JavaScript-Errors...
Questions page:
1. Empty or reference to TEMPLATE_CAPTCHA_NOT_OK.
2. Reference to TEMPLATE_QUIZ_TIME_LIMIT. REF_QUIZ_LIMIT will be empty if "quizTimeMinutes = 0".
3. Reference to TEMPLATE_PAGE_TIME_LIMIT. REF_PAGE_LIMIT will be empty if "pageTimeSeconds = 0".
4. Multiple reference to TEMPLATE_QUESTION.
5. Reference to TEMPLATE_QUIZ_USER_TO_SUBMIT (dontShowUserData = 0), to TEMPLATE_SUBMIT (dontShowUserData = 1) or to TEMPLATE_NO_SUBMIT (if no rights)
6. Dont delete the marker HIDDENFIELDS !!!!!!!
###VAR_QUESTION_IMAGE### |
###NO_SUBMIT###
###DOUBLE_ENTRY###
###NOT_LOGGEDIN###
###CHEATING###
... ... ...