First of all, my code works in FF and Opera... In IE it gives me an unknown runtime error...

Basically what my code does is extract data submitted via a form and adds it to the database. It then updates a table and a couple of divs on the page...

Code:
var AJAXForms = false;
var LastField = null;
var isIE = false;
// on !IE we only have to initialize it once
if (window.XMLHttpRequest) {
    AJAXForms = new XMLHttpRequest();
}
function ajax_addProduct(form,table,purchase_id) {
    if (window.XMLHttpRequest) {
        // branch for IE/Windows ActiveX version
    } else if (window.ActiveXObject) {
        AJAXForms = new ActiveXObject("Microsoft.XMLHTTP");
    }

    AJAXForms.onreadystatechange = function() { 
        if (AJAXForms.readyState == 4) {
            eval(AJAXForms.responseText);
            var tbody = document.getElementById(table).getElementsByTagName("TBODY")[0];
            var row = document.createElement("TR")
            var td1 = document.createElement("TD")
            td1.appendChild(document.createTextNode(res_product))
            var td2 = document.createElement("TD")
            td2.appendChild (document.createTextNode(res_price))
            var td3 = document.createElement("TD")
            td3.appendChild (document.createTextNode(res_commission))
            var td4 = document.createElement("TD")
            td4.innerHTML = '<a href="javascript:void(0);" onclick="ajax_deleteAddProductRow(this,\''+table+'\',\''+purchase_id+'\',\''+res_id+'\')"><img src="images/delete.png" border="0" /></a>';
            row.appendChild(td1);
            row.appendChild(td2);
            row.appendChild(td3);
            row.appendChild(td4);
            tbody.appendChild(row);

            form.product_name.value = "";
            form.price.value = "0.00";
            form.ongoing_date.value = "";
            form.ongoing_price.value = "";
            form.ongoing_interval.value = "";
        }
    };

    for (var i=0; i < form.product_select.length; i++) {
        if (form.product_select[i].checked) {
            var product_select = form.product_select[i].value;
        }
    } 
    if (product_select == "custom") {
        var product = form.product_name.value;
    } else {
        var product = form.product_id.value;
    }
    AJAXForms.open("GET", "modules/clients/ajax-add_product.php?purchase_id="+ purchase_id +"&product="+ product +"&price="+ form.price.value +"&ongoing_date="+ form.ongoing_date.value +"&ongoing_price="+ form.ongoing_price.value +"&ongoing_interval="+ form.ongoing_interval.value);
    AJAXForms.send(null);
}
This is a sample response:

Code:
var res_id = '849';
var res_product = 'Test Product';
var res_price = '$10.00';
var res_commission = '$100.00';
document.getElementById('price').innerHTML = '$40.00';
document.getElementById('commission').innerHTML = '$400.00';
When I comment out the two document.getElementById it works once... If I try submit the form again without reloading the page, it doesn't work.

Any ideas what is wrong? Liek I said, it works in FF and Opera.