View Single Post
  #4  
Old 12-21-2008, 11:49 AM
 
geckoday geckoday is offline
 

X-Wizard
  
Join Date: Aug 2005
Posts: 1,073
 

Default Re: Compatability Bug With Lytebox, IE and Xcart

I patched lytebox so I don't need to worry about running into this elsewhere.

In lytebox.js find this:
Code:
Array.prototype.removeDuplicates = function () { for (var i = 1; i < this.length; i++) { if (this[i][0] == this[i-1][0]) { this.splice(i,1); } } } Array.prototype.empty = function () { for (var i = 0; i <= this.length; i++) { this.shift(); } }
And replace it with this:
Code:
function removeDuplicates(thearray) { for (var i = 1; i < thearray.length; i++) { if (thearray[i][0] == thearray[i-1][0]) { thearray.splice(i,1); } } }
Find this:
Code:
this.frameArray.removeDuplicates();
Replace it with this:
Code:
removeDuplicates(this.frameArray);
Find this:
Code:
this.imageArray.removeDuplicates();
Replace it with this:
Code:
removeDuplicates(this.imageArray);
Find this:
Code:
this.slideArray.removeDuplicates();
Replace it with this:
Code:
removeDuplicates(this.slideArray);
__________________
Manuka Bay Company
X-Cart Version 4.0.19 [Linux]

UGG Boots and other fine sheepskin products
http://www.snowriver.com
Reply With Quote