Transport.js/run () Error: ' Process_request ' undefined _php tutorial

Source: Internet
Author: User
In Ajax using Ecshop (ie: transport.js)

ie sometimes appears: Referenceerror:process_request is not defined,ff appears: Transport.js/run () error:undefined, In fact, this is completely unrelated to transport.js. So where does the problem go?

(1) first found 445-447 lines found these two sentences:

/* Define two aliases */
var Ajax = Transport;
Ajax.call = Transport.run;

(2) and then found 735 found this sentence:

ajax.onrunning = Showloader;

Haha .... In fact, the problem is in the Showloader function of this sentence. Because in this function 753 lines have this statement

if (! obj && process_request), the above problem means that the variable process_request is undefined!!

(3) Why is the variable not defined?

The reason is simple because the EC is very often going to say this:

Put on the last side of the .... There are other things in the middle of the process, JS loaded, JS run and not yet run to the bottom of the time, of course, appear in the above error!!!

Process_request What is the use of this variable? In fact, in order to create a div layer to display "Processing your request ..." This information!! Why do we do this? Because it can support multiple languages.

Workaround:

(1) in the Showloader function body added this sentence var process_request = ' Processing your request ... '; English is changed to English ...

(2) var process_request = "{$lang. Process_request}"; This sentence is put in

The following

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.