0
I have the following code that takes a table on a php page and brings the table inside a div in my index.
But on this my getreult.php page there are codes in jquery, but they do not work, and if I want to run some function when clicking on a button that has getresult.php also does not work, even putting the jquery codes in index does not work.
I had the same problem once, but it’s been a while and I can’t remember how to fix it.
xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("listview").innerHTML = this.responseText;
}
};
xmlhttp.open("GET", "./app/getresult.php", true);
xmlhttp.send();
Is missing
"./app/getresult.php, true
close ...– NoobSaibot
The code is working, it calls the page to my div, only the jquery I had in getresult.php does not work, a simple Alert does not work, if I access the address of the getresult.php page in the browser then jquery works.
– Lucas
Check the console for any kind of error and also you closed the quotes as the wmsouza commented?
– GBTX