[eluser]Corey Freeman[/eluser]
Hey everyone!
I managed to figure out how to add a record via ajax using the following function:
Code:
[removed]
$(document).ready(function() {
$('#new-goal-submit').click(function() {
var msg = $('#new-goal-input').val();
$.post("<?= site_url('dashboard/add') ?>", {message: msg}, function() {
$('#dashboard').load("<?= site_url('dashboard/ajax') ?>");
$('#new-goal-input').val('');
});
});
});
[removed]
What I want to know is how I can delete a record also by using ajax. There's not a dynamically generated ID to account for when adding, so I'm kind of stumped. >.<
Help?