http://developer.mozilla.org/en/docs/ Core_JavaScript_1.5_Reference:Objects:Array:lastIndexOf
implies it's not standard ecma script... and has a workaround. On Sep 13, 2007, at 11:17 PM, Jim Coates wrote: > I should correct my earlier post. > > I'm not searching a string, I'm searching an array: > > var myIndex = myArray.lastIndexOf(myString); > > Jim > > -----Original Message----- > From: [email protected] > [mailto:[EMAIL PROTECTED] On Behalf Of Jake > Sent: Friday, September 14, 2007 1:13 AM > To: [email protected] > Subject: Re: lastIndexOf > > javascript:alert('one,two,three'.lastIndexOf(',')) > > works for me > > On Sep 13, 2007, at 11:00 PM, Jim Coates wrote: > >> Hey gang... >> I ran across something tonight that seems strange. I have a >> JavaScript on an iPhone app that I've been trying to use >> "lastIndexOf" with. It doesn't seem to want to function at all. If >> I change it to "indexOf", it works correctly but of course gives >> me the inverse of what I want for a string position (because its >> starting from the front of the string instead of the back of the >> string). >> It works either way with Safari and/or Firefox on my desktop, but >> hangs the script when using lastIndexOf on the iPhone. >> Have any of you had any similar issues? >> Thanks, >> Jim >> >> >> > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "iPhoneWebDev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/iphonewebdev?hl=en -~----------~----~----~----~------~----~------~--~---
