poll with ajax question |
[eluser]A.M.F[/eluser]
hi guys i built a poll, and i want to sopice it up a little bit wiyh ajax, so i want to show the results of the poll when a user votes, without refreshing the whole page. - this is with ajax, right? so, where do i need to start? i allready built the poll, i just need to add the ajax stuff. is there an ajax library for CI? do u have any tips for me? ideas maybe? thank u!
[eluser]ciscoheat[/eluser]
I would recommend jQuery for AJAX and DOM-manipulating stuff. Here's a good page with both a jQuery and ajax tutorial: http://www-128.ibm.com/developerworks/li...query.html It's a quick and quite dirty solution, but if you have a page that returns proper html from a request, this is all jQuery you need to attach that html to a html element: Code: $('#elementId').load('stats/update/parameters'); /Andreas
[eluser]A.M.F[/eluser]
thank u andreas, i will try to use jQuery for that. does anyone have any examples of using CI+DB+jQuery? cheers!
[eluser]Grahack[/eluser]
It uses Scriptaculous but I liked the way iheartrant is coded. See this discussion. You've got a nice and simple AJAX voting system with stars. Source code is here. |
Welcome Guest, Not a member yet? Register Sign In |