tags:

views:

27

answers:

0
<script type="text/javascript">

function showUser(str)
{
if (str=="")
  {
  document.getElementById("txtHint").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
 //document.myForm.text1.value=.innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","getuser.php?q="+str,true);
xmlhttp.send();
}
</script>


</head>

<body>
<form name="myForm">
  <p>Selec the Menu :
   <select   name="users" onchange="showUser(this.value)">
     <option value="">Select ID</option>
     <?php
do {  
?>
     <option value="<?php echo $row_rscustomer['customer_number']?>"><?php echo $row_rscustomer['customer_number']?></option>
     <?php
} while ($row_rscustomer = mysql_fetch_assoc($rscustomer));
  $rows = mysql_num_rows($rscustomer);
  if($rows > 0) {
      mysql_data_seek($rscustomer, 0);
   $row_rscustomer = mysql_fetch_assoc($rscustomer);
  }
?>
    </select>
</p>
  <p>&nbsp;</p>
  <p>
    <input  name="text1"   type="text"  value="<?php include ("getuser.php");?>" />
  <p>
</form>
<div id="txtHint"> </div>