Hi all,
Having gone through all the exisiting questions, I could not find a solution to the problem I was facing.
I have a Codeigniter application, which on one of it's views has a form which makes a AJAX call to submit data.
I have the Jquery code working for two AJAX calls but for one of the calls, from what I monitor in the header returns a resource not found error for the controller I call via POST. If I load the same resource directly, the browser loads the URL.
Here's my code
$(document).ready(function()
{
$("#submit_tag").click(function(){
$("#current_tags").fadeOut("fast");
tag = $("#new_tag").val();
$.ajax({
type: "POST",
data: "data="+tag,
//This returns a resource not found error
url: "<?php echo site_url('user/updatetag/');?>/",
success: function(msg)
{
$("#current_tags").remove();
$("#current_tags").fadeIn("fast");
$("#current_tags").html(msg);
}
});
});
$("a.single_tag").click(function(){
the_id = $(this).attr('id');
$.ajax({
type: "POST",
data: "data="+the_id,
//This URL works url: "<?php echo site_url('user/deletetag/');?>/",
success: function(msg)
{
$("#current_tags").fadeIn("slow");
$("#current_tags").html(msg);
}
});
});
});
Thanks for your time