Passing values to a controller through jquery ajax post |
[eluser]vintage75[/eluser]
Hi, I have created a form on my website for sending emails. Now what I'd like to do is check for errors using javascript and send the email using ajax so the page isn't reloaded. The error checking is fine but I have run into a problem when trying to pass the inputted data to a controller method so that it can actually be sent. Here is part of the jquery code I'm using to post the values to the controller Code: if (hasError == false) Now this runs fine and returns true. It successfully runs the send_email method in the lounge controller. Here is my send email method: Code: function send_email() The problem is that $this->input->post('email') is empty. I tried printing the whole $_POST array and it's all empty. Somehow the values are not making it to the controller. Did I take a wrong approach to doing this? Or maybe I am missing something? Any help would be appreciated. |
Messages In This Thread |
Passing values to a controller through jquery ajax post - by El Forum - 07-16-2010, 10:32 AM
Passing values to a controller through jquery ajax post - by El Forum - 07-16-2010, 12:33 PM
Passing values to a controller through jquery ajax post - by El Forum - 07-16-2010, 12:35 PM
Passing values to a controller through jquery ajax post - by El Forum - 07-16-2010, 12:44 PM
Passing values to a controller through jquery ajax post - by El Forum - 07-16-2010, 01:06 PM
Passing values to a controller through jquery ajax post - by El Forum - 07-16-2010, 02:36 PM
Passing values to a controller through jquery ajax post - by El Forum - 07-16-2010, 03:38 PM
Passing values to a controller through jquery ajax post - by El Forum - 07-16-2010, 07:54 PM
Passing values to a controller through jquery ajax post - by El Forum - 07-18-2010, 05:57 AM
|