I have been trying to fix this for a while now.
I have an ajax call to a php script which simply echos html back with data results. Chrome, firefox work find but IE and using any mobile browsers do not work. Since I can't get errors from the mobile browser I focused on the IE error which doesn't mean much to me and I cannot find any google or stack answers.
What am I doing wrong?
My ajax call:
$('#search').keyup(function(){
var details = $(this).val();
$.ajax({
url: '/assets/php/users/profile/ajax_searchjob.php',
type: 'POST',
data: 'title='+details,
success: function(data){
$('#target_field').html(data);
//alert(data);
//hide form snippet after ajax has loaded
$('.form-tag').hide();
},
error: function(){
alert('There was an error connecting to server. Please contact your administrator');
}
});//END OF AJAX
});
IE highlights $('#target_field').html(data);
in the debugger, halts and produces this error:
//creating functionality for time entry removal
$('#modal-action-btn').click(function(){
$.ajax({
type: 'post',
url: '/assets/php/users/profile/ajax_timesheet_remove_entry.php',
data: 'id='+ID+'&job='+job+'&user='+user,
success: function(){
cache.parent().parent().remove();
},
error(){
alert('There was a problem making the hour removal request. Please contact your administrator');
}
}); //END OF AJAX
}); //END OF TIME ENTRY REMOVAL FUNCTION