Problem with posting data ... - 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: Problem with posting data ... (/showthread.php?tid=50458) |
Problem with posting data ... - El Forum - 03-27-2012 [eluser]xJoseph10[/eluser] Hi everybody , I'm using codeigniter in my new forum script , I have recently a probleme with posting CKeditor data with an Ajax request (POST method) This is my ajax request Code: var nsig = CKEDITOR.instances.signature.getData(); but when I write caracters like ' Or " the input class returns a NULL value I'm waiting for your answers Problem with posting data ... - El Forum - 03-27-2012 [eluser]xJoseph10[/eluser] I wanna know if its a great idea to use the funtion escape before using ajax post Code: var text = CKEDITOR.instances.editor1.getData(); Problem with posting data ... - El Forum - 03-27-2012 [eluser]CodeIgniteMe[/eluser] You can use escape() function to serialize the data and then unserialize it at the back-end. Code: ' Or " when escape()d by javascript will return "% 27% 20Or% 20% 22" (without quotes and spaces) Problem with posting data ... - El Forum - 03-28-2012 [eluser]xJoseph10[/eluser] [quote author="CodeIgniteMe" date="1332901115"]You can use escape() function to serialize the data and then unserialize it at the back-end. Code: ' Or " when escape()d by javascript will return "% 27% 20Or% 20% 22" (without quotes and spaces) Thank u , so I'm using escape now , & when I get data from data base i use unescape to decode id ; its works so cool Problem with posting data ... - El Forum - 03-28-2012 [eluser]CodeIgniteMe[/eluser] Thank you too, I've learned something new to me from you. |