I have the following code to perform some actions on the change event of a dropdown in sharepoint. This code has been working for the past year, but has stopped working this morning...

var REQUEST_TYPE_TITLE = 'Request type';
$(document).ready(function()
{   
    $("select[title$='" + REQUEST_TYPE_TITLE + "']").change(function() { UpdateNewItem(); });
});

function UpdateNewItem()
{
    //do some stuff
}

As of this morning, the UpdateNewItem function does not execute when the dropdown is changed.

It seems there were 2 security updates applied to our Sharepoint server last night:

MS14-022 and MS13-084

No idea if these are related to this issue.

Has anyone experienced similar issues or have any suggestions for further investigation?

有帮助吗?

解决方案

Ok... the event wasn't firing because the title of the dropdown has changed. The title of the select element was previously 'Request type'. Now it is 'Request type Required Field'. This is certainly not as a result of a change we have made to the sharepoint list... this has always been a require field and the field name has always been (and still is) 'Request type'. So the only thing I can think of that could explain this is that the server updates applied overnight introduced a change to the way Sharepoint sets the title of the html element for required fields. Wow! I suppose this is the danger of using js with sharepoint.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top