New answers tagged

0

You have to use JQuery Deferred & Promise methods. Basically your AJAX call will return a promise and you can call our server button click event after the deffered action is resolved. See this api documentation and read this good post about the same. /* ajax calls returns promise by default*/ function doAjaxCall(){ return $.ajax({/*...


0

You don't have to deal with __metadata. Just specify your ContentTypeId in your request body and that's all. data: JSON.stringify({ __metadata: { "type": "SP.Data.Example_x0020_ListListItem" }, Title: "_", field1: "val1", field2: "val2", field3: "val3", ContentTypeId: "Your content type id" }) In the __metadata you need ...


0

Because this is a managed metadata (taxonomy) field a change event will not be triggered due to the way the field is implemented. Therefore one way to solve the issue is to create a function to listen for changes. I found a listener function and added it to your code. It seems to have the desired result, every time the metadata field is updated the ...


0

The Status HTML element most likely has no id value 'Status' So $('#Status') will always return undefined var statusField = SPUtility.GetSPField('Status'); probably does some magic in the SPUtility to get the element reference. Since you allready have the reference (provided SPUtility returns a proper DOM element) You can do statusField....


0

You can do this as below $(statusField.Dropdown).on('change', function() { alert('Changed'); });



Top 50 recent answers are included