My function works as expected in all non-IE browsers.  But when I try
it in IE8, it doesn't scan the array correctly.  Any easy workaround
rather than implementing my own indexOf()?

+++++++++++++++++++++++++++++++++++++

function isVideoFile(extension)
{
    extension = extension.strip();
    alert(typeof extension);
    alert(extension);
    alert(['3g2', '3gp', 'asf', 'asx', 'avi', 'flv', 'mkv', 'mov',
            'mp4', 'mpg', 'mpeg', 'qt', 'rm', 'vob', 'wmv'].indexOf
(extension));
}

+++++++++++++++++++++++++++++++++++++

The output when I pass in 'mpg':

1) string
2) mpg
3) -1
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to