[eluser]Jay Turley[/eluser]
Try using relative URLs; from some working code:
Code:
jQuery.ajax({
type: "POST",
url: "/index.php/map/add_item",
data: newItemData,
dataType: "json",
success: function(data,textStatus){
if ( ! data.success || data.success == 'false' ) {
// do failure stuff
} else {
// do success stuff
}
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
if (textStatus == 'timeout') {
// show network error
} else {
// show unknown error
}
}
});
I've never had a problem with using the relative urls. If this doesn't work, can you look in your console or echo the URI to the page so we can see *exactly* what the URI turns out to be?