function showEmp(){
if(validate())
{
for(var i=0; i < document.employee.puid.length; i++){
if(document.employee.puid[i].checked){
var emp_value = document.employee.puid[i].value;
}
}
xmlHttp=GetXmlHttpObject();
if(xmlHttp==null){
alert ("Browser does not support HTTP Request")
return
}
var url="getPatient.jsp"
url=url+"?emp_id="+emp_value;
xmlHttp.onreadystatechange=stateChanged
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
}
function stateChanged()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
var showdata = xmlHttp.responseText;
alert(showdata)
var strar = trim(showdata).split(":");
if(strar.length>0)
{
window.opener.location.reload();
window.location.reload();
opener.document.getElementById("puid").value=strar[1];
opener.document.getElementById("fname").value=strar[2];
window.close();
}
}
}
我无法在父窗口字段中显示值,在这个 var showdata = xmlHttp.responseText; alert(showdata) 在这里,即使我只是对 showdata 保持警惕,但它只显示空警报框,任何人都可以帮助我,!!