Problem with jquery AJAX and controller variable |
[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() {
[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 |
Welcome Guest, Not a member yet? Register Sign In |