Hola, prueba así.
    
Código Javascript
:
Ver original- function prueba2(pagina){ 
-         //Obtenemos el valor de la caja de texto, del tipo de consulta y del div 
-         var textb = document.getElementById('txtb').value; 
-         var tipos = document.getElementById('tipo').value; 
-         var contenedor = document.getElementById('resultados'); 
-             // creamos un nuevo objeto de Ajax 
-         ajax=nuevoAjax(); 
-         //usamos el metodo get 
-         ajax.open("GET",pagina+"?valor="+textb+" & tipo="+tipos,true); 
-         ajax.send();//PRIMERO DEBES ENVIAR LA PETICION 
-         ajax.onreadystatechange = function() { 
-             if (peticion.readyState == 4 && (peticion.status == 200 || window.location.href.indexOf ("http") == - 1)){//OJO, EL ULTIMO PARAMETRO ES POR SI ESTAS PROBANDO EN MODO LOCAL 
-                 var textoAjax=ajax.responseText; 
-                            contenedor.innerHTML=textoAjax;//  
-             } 
-         } 
-     } 
En esta página, al final deje unas funciones de ajax y uso básico, igual y te sirve. 
http://www.forosdelweb.com/f18/pasar...x-php-1070906/ 
Saludos