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(['3g2', '3gp', 'asf', 'asx', 'avi', 'flv', 'mkv', 'mov',
            'mp4', 'mpg', 'mpeg', 'qt', 'rm', 'vob', 'wmv'].indexOf


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 &" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to