Prototype. js Ajax cannot retrieve XML in Firefox ??? -* (¥-· (¥ ...... *...... $ -*(!!!

Source: Internet
Author: User

The Code is as follows:
<SCRIPT type = "text/JavaScript" src = "../scripts/prototype. js"> </SCRIPT>
<SCRIPT type = "text/JavaScript" src = "../scripts/transferxml. js"> </SCRIPT>
<SCRIPT type = "text/JavaScript">
// Global variable
VaR progressbar; // progress bar

Window. onload = function ()
{
// Load the list of organizations
Getbranchlist ("");
}

/*-------------------------------------------------------
Function: List of organizations
--------------------------------------------------------*/
Function getbranchlist (ID)
{
Progressbar = new progressbar ();
Progressbar. isneedprogressbar = true;
Progressbar. setstatus ("loading organization data ....");

VaR url = '../branch. Do ';
VaR pars = 'Action = getbranchlist & branchid = '+ ID;
VaR myajax = new Ajax. Request (
URL,
{Method: 'get', parameters: pars, oncomplete: getbranchlist_callback}
);
}
/*-------------------------------------------------------
Function: Organization list-callback Author: dengchunming
--------------------------------------------------------*/
Function getbranchlist_callback (originalrequest)
{
VaR objxml = originalrequest. responsexml;
Alert (originalrequest. responsetext); // for the first time, it is no problem to retrieve the list. Click "retrieve sublist" and the data will not be available. You can be sure that the background program has returned XML, but prototype. JS not received !!!!!
// Resolve the XML to divbranchlist
Displaytransformedxml (1, objxml, "../XSLT/admin_branch_list.xsl", document. getelementbyid ("divbranchlist "));
Progressbar. Close ();
}

</SCRIPT>

// There is no problem in IE. For the first time in Firefox, there is no problem in retrieving the list. If you click to retrieve the sublist, no data will be obtained. You can be sure that the background program has returned XML, but prototype. JS not received !!!!! Does anyone know why?

Related Article

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.