standard.js -> ReadOnload() fix

fiery

No avatar

2008-02-26 19:55

If you have multiple window.onload functions the standard.js -> AddOnload(f) is a good solution. Just replace all window.onload = function f{} with AddOnload('f'). However, the standard.js -> ReadOnload() doesn't work in QC 2.2, so I post a quick fix here:

function ReadOnload(){
for( var i=0; i < olArray.length; i++ ){
//alert( olArray[i] );
eval(olArray[i]+"()");
}
}

» Quick.Cart v2.x

wewior (OpenSolution)

Avatar: wewior

2008-02-27 08:45

that AddOnload and ReadOnload functions wasn't use in Quick.Cart v2.2 it was used in Quick.Cms since v2.0

temp100

No avatar

2009-05-07 21:08

In QC 3.3 AddOnLoad is in common.js and it is used. But I think it's wrong, even though it works for QC and QCms. I think ithe code should start with

function AddOnload){
  if( 
isIe() && isOldIe() ){
    
window.onload ReadOnload;
    
olArray[olArray.length] = f;
  }


Notice the brackets after isIe and isOldIe - I think those are meant to be evaluated as functions, not to be tested as defined symbols. Funny that this issue wasn't reported before, perhaps because QCms and QC never set window.onload before calling AddOnLoad...

wewior (OpenSolution)

Avatar: wewior

2009-05-08 09:03

yes, that is correct... thank you for notice

Back to top
about us | contact