JavaScript total error in IE-missing object! How to fix it

Source: Internet
Author: User
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.
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.