#3701 new
Tom Doan

SCRIPT5007: Unable to get value of the property '1' fix

Reported by Tom Doan | October 30th, 2013 @ 05:36 AM

I just patched a bug that returned "SCRIPT5007: Unable to get value of the property '1': object is null or undefined" on IE8+. Please merge it upstream.

The bug is in this block of code (line ~3160):

    var match = (filter || '').match(/alpha\(opacity=(.*)\)/);
    if (match[1]) return parseFloat(match[1]) / 100;

The problem is that in IE (filter || '') can return "progid:DXImageTransform.Microsoft.Alpha(Opacity=65) in some cases, which results in match = null because the regular expression is case sensitive. If match = null, then of course match[1] would also fail, hence the error.

The fix is to simply add the "i" flag to the regular expression:

    var match = (filter || '').match(/alpha\(opacity=(.*)\)/i);

UPDATE:

It appears (filter || '') can also return "progid:DXImageTransform.Microsoft." in certain scenarios, such as when you open, close, then open the login popup again in Magento's one-step checkout extension. To account for such cases, the fix should be revised to this:

    var match = (filter || '').match(/alpha\(opacity=(.*)\)/i);
    if (match && match[1]) return parseFloat(match[1]) / 100;

Comments and changes to this ticket

  • Jason Westbrook
  • jayanthchandra176

    jayanthchandra176 January 12th, 2018 @ 03:32 PM

    Get Latest Govt Occupations 2018 January Upcoming Occupations this Month of Work Reports 2018 Opportunities notification of all Government Jobs 2018 January Discuss Govt Vacancies including SSSB SSC PSC UPSC IT Employment opportunities 2018, Latest Govt Employment opportunities 2018 Latest Govt Professions in Railway Upcoming Govt Employment opportunities 10th Move Govt Job Regulators Jobs in Financing institutions Govt Professions Today Government Occupations for Engineers Authorities Employment opportunities in Tamilnadu Authorities Occupations in UP.
    jobs seekers who want to avail all latest Govt opportunities improvements for future years a year 2018-19. Here, we're able to keep you current with all latest sarkari naukri notifications 2018-19. A lot of Govt jobs vacancies be prepared to be released in the entire year in advance. So, if you are wanting to use for Sarkari naukri 2018 then you must continue to the post on regular time frame.
    Whether you discuss the state of hawaii vacancies or Central Government vacancies, Government occupations has been the main replacement of students from a long time. Numerous students turning up in Govt. Employment opportunities selection test every year. When any govt. job notification produces, the energy always find a good response from students.
    RRB NTPC 2018 Exam Date

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins

People watching this ticket

Pages