Welcome Guest, Not a member yet? Register   Sign In
ajax jquery post not working
#1

[eluser]Unknown[/eluser]
hi all, im a beginner in CI n this forum too, i try to use ajax to send my data to DB, but not working, i've tried to solve it, but it's still the same,

this my simple form:
Code:
<table id="formIn">
   &lt;form&gt;
       <tr>
           <td>Name : &lt;input type="text" name="nm"&gt;&lt;/td>
           <td>&lt;input type="submit" value="save"&gt;&lt;/td>
       </tr>
   &lt;/form&gt;
</table>
<div id="form_result">
</div>

this is my jquery ajax:
Code:
$("#formIn form").submit(function()
{
   $('#form_result').empty();
   $.post('http://MySystem/people/save',$(this).serialize(),function(data)
   {
$('#form_result').html(data);
   });
   return false;
});

i create save method in a class named people, just like this:
Code:
function save()
{
echo $this->input->post('nm');
}

i just want to test data that i input could be out in
<div id="form_result">
</div>
but, it dont display.

is there wrong code in code i write?
bcoz no error display, it make me confuse where my error is.

sorry if i make mistake something.
need ur help all, thanks b4.


Messages In This Thread
ajax jquery post not working - by El Forum - 11-07-2012, 06:58 PM
ajax jquery post not working - by El Forum - 11-07-2012, 07:10 PM
ajax jquery post not working - by El Forum - 11-08-2012, 09:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB