This is my first time working with AJAX. What I'm doing is submitting some data entered into a form to a PHP script, it gets added to a mySQL database, and then a new row needs to be added to a table with the data that's entered.
All of my XML request calls are correct, but I'm having problems with this bit of code:
"entries" is the name of a table, and the PHP script returns <tr>....</tr> as the responseText, so it should just add a <tr> to what's already there. This code works fine in Camino, Firefox and Safari. It works great. But I fired up my PC and tried it in IE6, and it didn't work, and IE gave me a very helpful JS error message: Unknown Error.
So, am I doing something wrong here? Is there another method I should be using to add a row? Thanks
All of my XML request calls are correct, but I'm having problems with this bit of code:
Code:
function handleResponse() {
if(request.readyState == 4){
document.getElementById("entries").innerHTML = document.getElementById("entries").innerHTML+request.responseText;
}
}
"entries" is the name of a table, and the PHP script returns <tr>....</tr> as the responseText, so it should just add a <tr> to what's already there. This code works fine in Camino, Firefox and Safari. It works great. But I fired up my PC and tried it in IE6, and it didn't work, and IE gave me a very helpful JS error message: Unknown Error.
So, am I doing something wrong here? Is there another method I should be using to add a row? Thanks