JavaScript total error in IE-missing object!
Query0=mssql_query ("select * from TB_XM where xm_pcid= ' 1 '");
$y = 1;
while ($myrow 0=mssql_fetch_array ($query 0)) {
?>
function Datawrite (){
if (xmlhttp.readystate==4 | | xmlhttp.readystate==0) {
Xmlhttp.open ("GET", "kspf_conn1.php?online_xm=" + " "+" &online_user= "+" "+" &online_ytbyx= "+ytbyx+" &online_mbnr= "+mbnr+" &online_zjzb= "+zjzb+" &online_ffjs= "+ffjs+" & online_xyqj= "+xyqj+" &online_jdjf= "+jdjf+" &online_zhpf= "+zhpf+" &online_sum= "+sum,true";
Xmlhttp.send (NULL);
}else{
Alert ("Datawrite () XMLHTTP object busy!" ");
SetTimeout (' Datawrite () ', 1000);
}
}
Datawrite ();
}
?>
The above code loops through the information in the project table and opens the Kspf_conn1.php input database via XML, checking that the kspf_conn1.php file is correct. However, after entering the program, there is a missing object error, where the ONLINE_XM value represents the project name, and when you enter the database, you can see that the names of all the items are changed to the name of the last project. Supposedly, the writing should be a different project name AH? JavaScript PHP Missing Object
Share to:
------Solution--------------------
Where is the XMLHTTP object defined?
------Solution--------------------
JS error should be in the generated page after the troubleshooting
You define the JS function Datawrite in the loop. ()。 Because the $y does not change in the loop, it simply repeats the definition of the DATAWRITE1 function. It's natural that only the last round of definitions will take effect.