Not sure why you want to do that it is doing, when you can simply do a
shift().... without reimplementing it...

But to fix the bug, make it "this.length - 2" in the for().

Mathew Robertson


On 16 July 2010 09:43, Luc <l...@dzinelabs.com> wrote:

> Good evening list,
>
> i just received a mail from a member who has troubles mailing to the
> list so he asked me to post his cry for help:
>
> <begin mail>
>
> Hi Everyone,
>
>
>
> This is my fist post but hope you can help
>
>
>
> I have a light box running on this page
> http://www.skyeshopfitters.com/clients.html  It isn't running very
> smoothly
> in IE8 and am getting the error below:
>
>
>
> Webpage error details
>
>
>
> User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0;
> SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.2; .NET CLR
> 3.5.30729; FDM; .NET CLR 3.0.30729; Tablet PC 2.0)
>
> Timestamp: Thu, 15 Jul 2010 14:34:49 UTC
>
>
>
>
>
> Message: Array length must be assigned a finite positive number
>
> Line: 464
>
> Char: 5
>
> Code: 0
>
> URI: http://www.skyeshopfitters.com/js/prototype.js
>
>
>
>
>
> Here is the code it is talking about:
>
>
>
>  shift: function() {
>
>    var result = this[0];
>
>    for (var i = 0; i < this.length - 1; i++)
>
>      this[i] = this[i + 1];
>
>    this.length--;
>
>    return result;
>
>  },
>
>
>
> This is line 464 of the above code:
>
>
>
> this[i] = this[i + 1];
>
>
>
> Char 5:
>
>
>
> T
>
>
>
> Can anyone help
>
>
>
>
>
> Thank You
>
>
>
> Edward Deane
>
>
>
> New2excel Logo copy
>
>  <http://www.2excel.com.au/> www.2excel.com.au
>
> ede...@2excel.com.au
>
>
>
> Ph: (08) 8121 7724
>
> Mob: 0488 616 676
>
> Fax: (08) 8268 7718
>
> <end mail>
>
>
>
>
> --
> Regards,
>  Luc
> _________________________
>
> http://www.dzinelabs.com
>
> Using the best e-mail client: The Bat! version 4.2.6 with
> Windows XP (build 2600), version
> 5.1 Service Pack 3 and
> using the best browser: Opera.
>
> "Due to unforeseen circumstances, the release date of Windows 2000
> has been postponed until January 1901."
>
>
>
> *******************************************************************
> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
> Help: memberh...@webstandardsgroup.org
> *******************************************************************
>
>


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*******************************************************************

Reply via email to