Overlib.js not working in Internet Explorer 10 (IE 10)

The overlib.js fail to work in IE 10. The error that is usually thrown in the console is "SCRIPT5007: Unable to get property '1' of undefined or null reference "
I investigated and found that the code simply considers the browser version to be only 1 digit. So, when we use IE 10, this does not match.
There is a simple solution though.

In the overlib.js file, line #216 the code is as below:
var versNum = parseFloat(agent.match(/MSIE[ ](\d\.\d+)\.*/i)[1]);

Change this to
var versNum = parseFloat(agent.match(/MSIE[ ](\d{1,2}\.\d+)\.*/i)[1]);

This code will work at least till IE 99 :-)

Comments

Anonymous said…
Good fix. Just what we were looking for. Thanks for posting this.
Unknown said…
Thank you so much for the post! Solved my problem in 5 minutes!
Unknown said…
Thank you very much for the post, life saver!
John Chandler said…
Thank you very much.
Anonymous said…
Thank you so much
Anonymous said…
Thank you. You saved me hours of frustration!

Olivier
Anonymous said…
Thank you, it solved my problem
Anonymous said…
Thank you, you made my day! :)
Anonymous said…
Thank you for the post!!!!
Mcwike said…
You save my life!!! :) Thanks a Lot
Larry K said…
Dude, You seriously ROCK, Thank you
SnoWiz said…
Great! It would have taken me a long time to find this (if at all). I appreciate it!
Anonymous said…
Great help, thanks!
Anonymous said…
Wow, overlib.js was working perfect for the longest time until I updated to IE10. I'm so glad for this fix. How much money do I owe you? LOL!
Anonymous said…
Ah great, first hit on Google!
Anonymous said…
Isn't Google great! Just type in your problem and presto, problem solved! Beats the old days of digging through books. Anyway, thanks Prasanth for the fix - it worked great!
Anonymous said…
Hi Prashant,

When I searched for overlip on google, in the third position I could see your blog with you photograph. The fix that you have posted related to IE 10 is helpful for all those who are using overlib. Thanks.

Well done!!!

Sachin Jos
Havas World Wide Muscat (Digital)
Ove Molland said…
Great!!! Thank you.
Kenneth said…
Really useful! Thanks a lot!
Tyler D. said…
You are a saint! Thanks for posting this fix :)
Anonymous said…
Great solution. Thanks for posting!
Unknown said…
wow... i echo all of the 'lifesaver' and 'thank you!' posts.

you are the man.

Anonymous said…
WONDERFUL thank you SO much
Berna said…
Thanks Dude! Very useful.
Unknown said…
Another solution : https://github.com/overlib/overlib/issues/1 (+ instead of {1,2}
François said…
You've heard it already, but not enough yet: Thank you!!!
Anonymous said…
Saved me a lot of work. Thanks!
Anonymous said…
worked like a charm!
emanweb said…
Great post! Fixes the problem. :)
Anonymous said…
Thank you!
Anonymous said…
Brilliant. Save tons of time finding a work around.
Anonymous said…
Nice!
Anonymous said…
Excellent fix - worked like a charm!
Anonymous said…
And still the gratitude pours in - I hate using libraries - but have been using overlib forever. Major client just spotted part of their ordering system was no longer working (and I guess, for some people hasn't been for months). I spent a few days trying to pick at the code - is it mine, is it overlib, some conflict, etc. Give up, start planning an alternative, then just think to type it in Google, and your advice had it fixed in seconds. Heaps-o-thanks to you.
lugosinagy said…
It was cool fix ! Thank You !
From Hungary.
Anonymous said…
Thanks from Iceland
StAnger said…
Thanks a lot! You are great!
Anonymous said…
It is very good and very helpful solution. Thank you very much!!!
Mario RM said…
Thank you, you made my day! :) [2]
Unknown said…
Thank you, it was helpful!
Anonymous said…
Thank you!
Anonymous said…
Thank you.
Anonymous said…
Many thanks, saved me hours...
Anonymous said…
It works on IE11, though without this fix. any ideas why?
Martin said…
Thank you sir!
Anonymous said…
Thanks :)
Unknown said…
Many Thanks. Very Helpful

Popular posts from this blog

Hide notification content in Android lock screen for Messages, email, whatsapp and selected apps.

Array functions in JavaScript