Ver Mensaje Individual
  #1 (permalink)  
Antiguo 31/03/2010, 14:38
Avatar de zreep
zreep
 
Fecha de Ingreso: octubre-2009
Ubicación: Argentina
Mensajes: 534
Antigüedad: 14 años, 7 meses
Puntos: 12
Pregunta ayuda con scrip

Hola de nuevo tengo este scrip que hace que se vea al instante un usuario seleccionado. Pero trabaja con selec y lo que quiero hacer es que se active cuando agrego un cliente, se que va en un submit de valor agragar pero no se como ponerlo

Código:
var xmlhttp;

function showUser(str)
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Browser does not support HTTP Request");
  return;
  }
var url="getuser.php";
url=url+"?q="+str;
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=stateChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

function stateChanged()
{
if (xmlhttp.readyState==4)
{
document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
}
}

function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}
espero me ayuden gracias