I attempted to initiate an ajax call to successtext.html located on my computer. However, upon checking my browser's console, I noticed that both success and error messages were displayed. Here is the script I used:
<script type="text/javascript">
$(window).ready()=>{
$.ajax({
type : "GET",
url : "successtext.html",
success : console.log("success"),
error : console.log("error")
});
});
</script>