Transport. js/run () error: 'process _ request' undefined

Source: Internet
Author: User

When using ECshop AJAX (that is, transport. js)

IE may sometimes see: ReferenceError: process_request is not defined, and FF will show: transport. js/run () error: undefined, which is completely irrelevant to transport. js. So where is the problem?

(1) first, find row 445-447 and find these two sentences:

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

(2) then find "735" and find this sentence:

Ajax. onRunning = showLoader;

Haha .... In fact, the problem lies in the showLoader function in this sentence. Because this statement exists in the first row of the function.

If (! Obj & process_request). If the above problem occurs, the variable process_request is not defined !!

(3) Why is this variable not defined?

The reason is very simple, because EC often uses this sentence:

<Script type = "text/javascript">
Var process_request = "{$ lang. process_request }";

.....

</Script>

Put it at the end .... The above error will certainly occur when other processing, JS loading, and JS operations are not yet running at the bottom !!!

What is the use of the process_request variable? In fact, it is to create a DIV layer to display "processing your request ..." This information !! Why? This supports multiple languages.

Solution:

(1) Add this var process_request = 'processing your request... '; English is changed to English...

(2) Put var process_request = "{$ lang. process_request}"; in <script> below

(3) Redefine Ajax. onRunning. For example, you can create a new function run, Ajax. onRunning = run.

Method 2: for this problem, the Official Administrator replied that "Sometimes ajax captures incomplete order information and such an error message appears, but this does not affect your normal use. Please rest assured. If you want to disable it, you can remove it from the basic settings of the store settings in the background .", In fact, according to the official statement, the problem still exists. The solution is to comment out the pop-up statement: Find js/transport. js, Row 3: alert (this. filename + "/run () error:" + ex. description); copy the code to/* alert (this. filename + "/run () error:" + ex. description );*/


From shunzi Network

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.