Ecshop transport. JS/run () error: Undefined

Source: Internet
Author: User

When using ecshop Ajax (that is, transport. JS)

IE sometimes appears:Referenceerror: process_request is not defined, FF appears:Transport. JS/run () error: UndefinedIn fact, this has nothing to do with 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... the problem lies in this sentence.ShowloaderFunction. Because this statement exists in the first row of the function.

If (! OBJ & process_request ),The above problem occurs, that is, the variableProcess_requestNo definition !!

(3) Why is this variable not defined?

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

<SCRIPT type = "text/javasOther ">
VaR process_request = "{$ Lang. process_request }";

.....

</SCRIPT>

Put it at the end of the article... when there are other processing tasks, JS loading, and JS running in the middle, the above error will certainly appear before it reaches the bottom !!!

Process_requestWhat is the use of this variable? In fact, it is to create a div layer to display the message "processing your request !! Why? This supports multiple languages.

Solution:

(1) InShowloaderAdd this sentence to the function body.VaR process_request = 'processing your request ...';In English, it is changed to English...

(2) ChangeVaR process_request = "{$ Lang. process_request }";This sentence is placed in the <SCRIPT> below

(3) Redefine Ajax. OnFor example, you can create a new function run, Ajax. On.Running = 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); */copy the code

Original article: http://hi.baidu.com/javaplan/blog/item/e785bb4bb5f034fe83025cd3.html

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.