![]() |
[SOLVED] csrf & jqueryui autocomplete - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: [SOLVED] csrf & jqueryui autocomplete (/showthread.php?tid=39665) |
[SOLVED] csrf & jqueryui autocomplete - El Forum - 03-17-2011 [eluser]predat0r[/eluser] Hi, I use JQueryUI Autocomplete on my page for search purposes. If I include the csrf cookie data to the ajax call, it doesn't pass the typed parameter, only the csrf data. I don't know much about JQuery but maybe someone saw similar problem during CI development.. CSRF switched OFF - Firebug console says: (and term "asus" passed to the php script well) term = asus CSRF switched ON: [object Object] csrf_test_name 23d8bf447d1d3d8825d2080fd87f4475 So some way it don't takes the parameter to my php script. The ajax code: Code: $(function() { Any idea? Thank you [SOLVED] csrf & jqueryui autocomplete - El Forum - 03-17-2011 [eluser]InsiteFX[/eluser] Read this article - Use jQuery cookie InsiteFX [SOLVED] csrf & jqueryui autocomplete - El Forum - 03-17-2011 [eluser]predat0r[/eluser] Thanks, it works now.. i get a bit of code snippet hint from jq ui page, and modified the code: data: { term : req.term, csrf_test_name : cct}, this way works the param giving, and bad with adding the params with '+' sign |