Tag Info

New answers tagged

0

Use FileLeafRef field to query document names. See this example: http://platinumdogs.me/2009/07/21/querying-document-libraries-or-pulling-teeth-with-caml/


0

I think you should try using the completefunc property of SPDisplayRelatedInfo parameters to pass a function which runs your cleanup code. This will allow it to run after the request has been completed and the extra table has been added to the page. The document.ready() event is similar to a _spBodyOnLoad function in SharePoint. Both waits for the main ...


0

Almost everything is correct. But you have to change the BodyStyle to WebMessageBodyStyle.Wrapped [OperationContract] [WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.Wrapped, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)] List<string> SearchList(string test);


0

This looks like a scoping issue. $.cookie("coo", txt); is outside of the $(document).ready function. Put it inside the function: $(document).ready(function(){ $("input.search").change(function() { var txt = $("input.search").val(); if (txt) { $("#WebPartWPQ2").find("tr.ms-itmhover:not(:Contains("+txt+"))").hide(); ...


0

I wrote about this same thing in my blog. (Not trying to plug). Here is the jist of the solution. Use local storage in HTML. <script type=”text/javascript” src=”../../Style Library/js/jquery-1.11.1.min.js”></script> <script type=”text/javascript”> $(document).ready(function(){ ...


0

I found out that this is not possible. I am now working on an own grid for my page. Sharepoint 2013 supports for most parts bootstrap.


0

Change the btnADD to btnAdd then it worked


0

The ajax call was correct, the error was because of my SharePoint field type:text, changed it to number, now it works.


0

Check if you can see the list with a basic get request with something like: $.getJSON("_spPageContextInfo.webAbsoluteUrl + "/_vti_bin/listdata.svc/PollUserData", function(data) { console.log(data) }); Which will log the contents to your browser dev tools console. Once you get that figured out.... You're also not passing the request digest in your ...


-1

Since you are using SharePoint 2013 I would recommend you to consider a different approach, in SharePoint 2013 was introduced a so called Client Rendering Mode (CSR) which is intended for rendering of List Views and Forms using HTML and JavaScript. How to initialize User field in New/Edit forms using CSR Below example demonstrates how to populate User ...


1

Ah! I found a solution! http://jasonscript.wordpress.com/2013/08/07/javascript-and-working-with-the-sharepoint-2013-people-picker/ Here is my working code: var PickerTitle = "Assigned To"; var PickerDiv = $('[id$="ClientPeoplePicker"][title="' + PickerTitle + '"]'); var PickerEditor = PickerDiv.find('[title="' + PickerTitle + '"]'); var PickerInstance = ...


0

In that case you can directly use the id of the iframe and use it like $('#ct100_PlaceHolderMain_g_77ed0a4b_ee91_48e3_2b152a3cde83_ff11_1...).contents‌​().find("body").html(); make sure you replace... with the complete id of iframe If you want to get content of div, then do find("div").html() After body find.


0

I have had the same goal with my custom field. The best way to do it is to apply the View template for your column with jslink. In the view template you can check if the field is rendered in Quick Edit (inGridMode) and set AllowGridEditing to false on the field: if (ctx.inGridMode) { field.AllowGridEditing = false; } Suppose you have a field called ...


0

None of these other answers above worked for me, and I don't know how they would. Here is my brute force method of how I got it to work: // Default the Requestor's Name var welcomeText = $('[id*="zz8_Menu"]').text(); // this is zz7_Menu in SP 2007 var user = welcomeText.split('Welcome ')[1]; var counter=0; $('div[title="People Picker"]').each(function() { ...


3

scenario: when you enter form editing and has some user of this picker people, this is the "oldHtml"? (I'm finding this a bad practice) try using this code: var getIDPeoplePicker=$("div[Title='Column Name of the people picker here']").id; var ppobject = SPClientPeoplePicker.SPClientPeoplePickerDict[getIDPeoplePicker]; var usersobject = ...


0

I think you are implementing in JS. This return array object, see image below: The code: var getIDPeoplePicker=$("div[Title='Column Name of the people picker here']").id; var ppobject = SPClientPeoplePicker.SPClientPeoplePickerDict[getIDPeoplePicker]; var usersobject = ppobject.GetAllUserInfo(); usersobject.forEach(function (index) { ...


1

This is easily done by creating a custom list with a 1 number column to store the value. Create an element in this list with 0 as value. Then create a script that gets and increments this value through the REST API for lists, and the saves the new value in the list. Add this script in a Script Editor Web Part.


0

I solved this by replacing text in search text box and replacing keydown function search action... Here is code: //Function to Change default behavior of SearchBox function FixSearchBox() { var theSearchBox = $('#SearchBox input'); var defaultSearchText = "Search this site"; var preferredSearchText = "Search ...


1

I'm not sure what you mean with freeze, but I can't see where you call or close the "working on it". I made simple example with dummy code, maybe it will help you. Because I have never seen that async calls have locked the UI etc, so you could try this approach: SP.UI.ModalDialog.showWaitScreenWithNoClose("title", "message", 400, 400); var ...


0

This article explains every scenario for the datetime picker control. I've used it without issue. http://theway4ward.wordpress.com/2013/07/30/211/


0

I had a similar problem and found a solution that doesn't require pre-expanding the groups. I've adapted it to fix your problem. After digging through the sharepoint javascript files, here's the approach I used: function FixTheThings() { createImages(); //Hook into SharePoint event to fix all links in group-by tables. var oldExpand = ...


0

Data corrupted ? the problem is on fileInput: function ProcessUpload(fileInput) reader.readAsArrayBuffer(fileInput); Some point to reflect: But how can you get the fileinput ? if get fileList(files) give error or corrupt, why this parameter is file, only "FILE". And other, i have used RequestExecutor to upload files and not AJAX with JQUERY. But ...


1

We have used Spin.js in several such scenarios. Usage Define a <div> in the HTML markup <div id="userTableSpinner"></div> Then in Javascript code find the div and start spinner and finally stop it once all processing is done: var userTableSpinner; function someProcessStartsHere() { if (userTableSpinner == null) { userTableSpinner ...


0

If you are in infopath you can expand the field in the field list to see the display name node. Choose properties for display name. Then type the default display name exactly plus a semicolon, as it would appear when you actually select a person or group.


2

Since your ultimate goal is to manage visibility of navigation nodes based on user permissions, let me demonstrate another approach (no code solution). How to configure Audience for Navigation nodes: Go to Site Settings -> Navigation select Navigation Heading or Link and click Edit link specify Audience property. The figure below demonstrates how to ...



Top 50 recent answers are included