Problem with jquery AJAX and controller variable - 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 jquery AJAX and controller variable (/showthread.php?tid=49990) |
Problem with jquery AJAX and controller variable - El Forum - 03-10-2012 [eluser]condoace[/eluser] I am trying to call a controller method from a jquery AJAX script, everything seems to work fine (i.e. when I check in Firebug the values/varaibles are being posted to the controller) however cant get any of the input variables using $this->input->post(). Check out my code below: Any ideas would be helpful!? VIEW Code: $(function() { CONTROLLER Code: function form() { Problem with jquery AJAX and controller variable - El Forum - 03-10-2012 [eluser]Make Code& Love Code[/eluser] Hi !!! I had check your code and tested also. Its working fine for me.I am including my code here. Just try it out again. Hope it will work. VIEW FILE ============= [removed][removed] <form action="<?php echo base_url()?>/index.php/welcome/checkform" method="post" name="frmPost"> <div id="contact_form"> </div> <div id="message"> </div> <input type="text" id="name" name="name" /> <input type="text" id="email" name="email" /> <input type="text" id="company" name="company" /> <input type="button" id="submit" value="Submit" /> </form> [removed] Code: $(function() { CONTROLLER ================= Code: public function index(){ Try this out. Hope your problem will solve. Its working fine for me. For your reference I have attached Screenshot with this post. With Thanks & Regards, Sanjay Software Engineer, Chennai,India http://sanjoyinfoworld.blogspot.in |