I am new to Angular and I'm experiencing some issues. If I click any JavaScript element, I get this error:
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.
which relates to this function from jQuery
function rapport_nikko_send_focus_event(element_)
{
try
{
var req = new XMLHttpRequest();
req.open('GET', rapport_nikko_get_xhr_url('focus_change' , 'frame_id=1&focused=true&event_magic=DE3EEC717983&'+rapport_nikko_get_element_data(element_)),false);
req.send();
}
catch(err)
{
}
}
I read HERE that I'm having this issue because of a synchronous XMLHttpRequest. but I'm loading the jQuery.min.js file like this:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
So I don't know how to change it to asynchronous
Also, my JavaScript events aren't triggering.
this button in my header
<button id="calendarButton">Calendar</button>
doesn't call this function in script.js
$(document).ready(function() {
$('#calendarButton').click(function(){
console.log("in"); //Not working
alert("in"); //Not working
});
});
All files are included