Prueba asi...
Código javascript
:
Ver originalfunction anadeCategoria(){
if(objXML){
frmCat = document.getElementById('frCategorias');
strContenido = frmCat.elements[0].id + "=" + frmCat.elements[0].value;
capaCat = document.getElementById('categoria');
objXML.open('POST', 'categoriaAnade.php', false);
objXML.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
objXML.setRequestHeader('Content-Length', strContenido.length);
objXML.send(strContenido);
objXML.onreadystatechange=function() {
if (objXML.readyState==4) {
capaCat.innerHTML = '<p>' + objXML.responseText + '</p>';
}
}
}
}
Saludos