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