Can anyone explain what is theses errors?
Uncaught TypeError: cannot read property \'innerHTML\' of null
View on my website This
While you should ideally highlight the code which is causing an error and post that within your question, the error is because you are trying to get the inner HTML of the 'status' element:
var idPost=document.getElementById("status").innerHTML;
However the 'status' element does not exist within your HTML - either add the necessary element or change the ID you are trying to locate to point to a valid element.
The question doesn't ask for jquery. So lets do it without jquery:
document.addEventListener("DOMContentLoaded", function(event) {
//Do work
});
Note this method will not work on IE8.
You are calling this script before DOM is ready. If you write this code into jquery's $(function() method it will work.