Não tem como o AJAXConsequence retornar texto HTML puro? Sem ser XML? Geralmente eu uso apenas o object.innerHTML... eu tenho a função do GET e do POST, se precisar:
xmlHttpRequest
Code:
function getXMLHttp(){
try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) {}
try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {}
try { return new XMLHttpRequest(); } catch(e) {}
alert("XMLHttpRequest not supported");
return null;
}
GET
Code:
function mudaPaginaPeloGet( idObjetoMuda , linkXML ){
xmlhttp = new getXMLHttp();
xmlhttp.open( "GET" , linkXML , true );
xmlhttp.onreadystatechange = function() {
if ( xmlhttp.readyState == 4 ){
if( xmlhttp.status == 200 ){
document.getElementById( idObjetoMuda ).innerHTML = xmlhttp.responseText;
}else{
alert( xmlhttp.statusText );
}
}
}
xmlhttp.send( null );
}
POST
Code:
function mudaPaginaPeloPost( idObjetoMuda , link , variaveis ){
xmlhttp = new getXMLHttp();
xmlhttp.open( "POST" , link , true );
xmlhttp.onreadystatechange = function() {
if ( xmlhttp.readyState == 4 ){
if( xmlhttp.status == 200 ){
document.getElementById( idObjetoMuda ).innerHTML = xmlhttp.responseText;
}else{
alert( xmlhttp.statusText );
}
}
}
xmlhttp.setRequestHeader( 'Content-Type' , 'application/x-www-form-urlencoded' );
xmlhttp.send( variaveis );
}
Eu uso sempre as tags div com um id <div id="bla"></div> e coloco a ação javascript em um botao <input type="button" value="Botão" onClick="mudaPaginaPeloGet( 'bla' , 'pagina.jsp?variavies' );">. Eh super simples...
Tenho uma boa experiência com AJAX... se precisar...