Re: [OT] javascript guru out there?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  On 07/22/2010 10:50 AM, Mike Wright wrote:
> Hi all,
>
> Sorry to post this here but of all the lists/forums I'm on this one
> seems to have the most diverse talent pool.
>
> I've been developing a javascript application that works everywhere
> except on Google's Chrome browser and have tracked it down to a "for
> each" statement.  To verify that's what it is I created a tiny example
> program and sure enough that one also fails.  Upgraded Chrome to the
> latest stable version and the failure persists.
>
> If anybody wants to take a peek/stab at this I could sure use the help -
> I've been stumped on this for two days now.
>
>           http://www.pastebin.com/Pq5E8Tfe
>
> Thanks for any and all help,
> Mike Wright
>

Running a for on a list in JS is asking for trouble. One of the list 
elements is .length, so it won't do what you want it to in at least one 
of the cases. Maybe Chrome is blocking it on purpose.
Instead, use for (var y=0; y<x.length; y++)
Or you can reverse the loop if you need to optimize it for (var  
y=x.length; y>=0; y--)


-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux