Results 1 to 3 of 3

Thread: IE's indexOf problems.

  1. #1
    Join Date
    Apr 2008
    Location
    San Diego, CA
    Posts
    352
    Thanks
    57
    Thanked 6 Times in 6 Posts

    Default IE's indexOf problems.

    I was having trouble with indexOf() and IE6 (worked fine in FF and Safari), and Google led me to this:

    http://developer.mozilla.org/En/Core...#Compatibility

    That snippet fixed the problem in IE. Is this always necessary when using indexOf? Is it because of the array? Here is the code:

    oIndex = compareVINs.indexOf(oQuery);

    Where compareVINs is an array, and oQuery is a string.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Yes. JScript does not implement Array.prototype.indexOf, which is a non-standard Mozilla extension. String.prototype.indexOf still exists.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. The Following User Says Thank You to Twey For This Useful Post:

    jlizarraga (08-30-2008)

  4. #3
    Join Date
    Apr 2008
    Location
    San Diego, CA
    Posts
    352
    Thanks
    57
    Thanked 6 Times in 6 Posts

    Default

    Ah. Thanks!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •