Tag Info

New answers tagged

0

From your answer to your question it looks like "Path" is a member of your ResultRows objects. Can you access it directly from the Title column like so: var oTable = $('#articlesOverview').DataTable({ "iDisplayLength": 25, "bDestroy": true, "bProcessing":true, ...


0

A temporary solution is to add the Path column to the table and then read the data for each row from this column and add the link to the other column.like this: var oTable = $('#articlesOverview').DataTable({ "iDisplayLength": 25, "bDestroy": true, "bProcessing":true, ...


0

You could display your results using datatables. Although not looking exactly like Sharepoint, it should give you the features you are looking for - filtering, sorting, paging. DataTables Table plug-in for jQuery


0

Try escaping the beginning and closing " in your return statement. Example: return '<a href=\"'+mPath+'\">' + mData+'</a>';


0

I think you have the client context that starts with dev and you are in test: var clientContext = new SP.ClientContext("http://dev");


1

I've been using the DataTables plugin for jQuery Javascript library to build lists with full sorting, filtering, etc. functionality using the SharePoint API. The library is pretty easy to use and there are additional extensions and plugins. As an example, here's a simple initialization of a DataTable with a filter added to the 2nd column that I built a few ...


3

Try to use validation settings for that - something like =IF(Num1+Num2+Num3<=100,"OK","Not OK") should totally work and will prevent the user from saving. Here's some reference for the formulas - ...


4

Have you tried to set keywordQuery.set_trimDuplicates(false); (MSDN) because maybe some rows / items are incorrectly treated as duplicates by search?


1

Finally I found the solution, it was with the _doPostBack function. It should be removed and then handled with help of two functions: • $('input[id^=' + controlID + ']').autocomplete({... • $('input[id^=' + controlID + ']').keypress(function(e){... The correct code is then: <script> $(document).ready(function(){ var itemSource = []; var ...


2

Answering your updated question, as to why you need an asterisk for it to work: Because 0x010066FA3DE3E334C841B418C82CC475A227 is an ID of a site level content type. When you add a site content type to a list, SharePoint makes a local copy on the list itself. From this article on MSDN (emphasis mine): In addition, SharePoint Foundation makes a local ...


2

I would suggest to use a simple IDE to develop your code. This IDE will help you by finding simple errors. A free example for a IDE is Visual Studio Code but there are loads of IDE's for you to choose. Here's the output if I paste your code: After knowing the simple errors fixing is not the problem - at least the ones caused by bad syntax.


0

Try wrapping your JavaScript inside the SharePoint 'ready' function: <script> function _spBodyOnLoad() { var pickerPeople = SPClientPeoplePicker.SPClientPeoplePickerDict['<ID of my people picker>'].GetAllUserInfo(); if (pickerPeople.length > 0) { alert("User: " + pickerPeople[0].DisplayText); } } </script> Not sure ...


0

try to enclose your code in _spBodyOnLoadFunctions.push(function(){ // code to capture people picker value }); Or use JSLink to add PostRender callback ovverideCtx.OnPostRender = function(ctx){ //code here };


0

Actually it is alot easier - You can access a normal peoplepicker in SP2013 the same way you would access a clientside one. The Problem is, that you need to know the ID to identify the peoplepicker. Alternatively you can iterate over the global Object containing the PeoplePicker's. If you check out the SPClientPeoplePicker.SPClientPeoplePickerDict object ...


0

What is the solution to the get the value of lookup field var table = $('#example').DataTable({ "filter": true, "bDestroy": true, "bProcessing": true, "aaData": data.d.results, "aoColumns": [ { "mData": "ID" }, { "mData": "Title" },{ "mData": "lookupfield" },]


0

This may be related. Check your form for hidden fields. I had the same situation doing autofill on select boxes. There is one value for what is displayed and another for what is actually kept in the form data. ex. Select box is: But the values are actually stored in: so if you get the values from the Hidden id field you should be set.


0

There is an out of the box solution also, maybe not as flexible but it works for my purposes. You can create views using the order column, with each view filtering to the number you want to appear on each row: View 1 filter: “Order” less than 6 View 2 filter: “Order” greater than 5 and less than 10 Etc... Next, just add a web part to the page for each ...


1

b1c10's answer is probably on the right track, stating that the problem might be on the file input, try to check if you actually upload the correct stream to the REST API. If the stream is already corrupted before the actual upload, it has nothing to do with your POST. Try to convert your stream back to the original file locally and see what that tells you. ...


0

This should do it: function PreSaveItem() { var N1 = $("select[title$='LookUpField'] option:selected").text(); $ ( "input[title='SingleTextField']").val(N1); return true; }


0

There is some problem with the original code. It doesn't work whenever you have more than 1 webpart on your page. Here is a link to updated/improved code that will work with multiple webparts. SharePoint 2013 Promoted Links Wrapping


0

To get the checkbox in front of the country Name you can do like this: You can either use REST or SPServices for this, I have done this using SPServices, $().SPServices({ operation: "GetListItems", async: false, listName: "Country List", completefunc: function (xData, Status) { if(Status == 'success' ) { ...


0

i was able to achieve something similar in a page populated with several instances of Content by search webparts with display templates: i had to append parameters to all document links (both in and outside the webparts) first using $(document).ready didn't seem to work at all so i used $(function) to replace all links outside of the webparts cfr. ...


0

I had similar problem and I solved it without script. Solution is little bit non-engineer as I didn't have time to spend it searching for better solution but it works :) There are two columns, one that is drop down choices, which is hidden from View and one multiline text NOTE: rich content checked so you can enter HTML. the second column is hidden from ...


2

Go to Site setting --> Under look and feel go to Navigation Select the link which you want to open in new tab , and edit that link Check open in new tab and its done. Hope this helps


0

If you really need to implement such a copy mechanism using javascript you can use the javascript Client Script Object Model also called JSOM for this task. You can find a description and examples here: https://msdn.microsoft.com/en-us/library/office/hh372944(v=office.14).aspx Using JSOM will only work if you're calling that script from within SharePoint. ...


0

Use the following code to add the jQuery and Bootstrap reference: <SharePoint:ScriptLink ID="ScriptLink7" language="javascript" name="~SiteCollection/Style Library/Style/js/jquery-1.10.2.min.js" runat="server" /> <SharePoint:Scriptlink ID="Scriptlink140" runat="server" name="~SiteCollection/Style Library/Responsive Style/js/bootstrap.js" ...


0

Assuming it is SharePoint-Server and and you are changing the Master Page you can do this Style Sheets can be referred in Master Page by adding CssLink control in header section of Master Page. Find below the sample for adding Style Sheet reference directly in Master Page. Add the below code inside the head tag of Master Page. ...


2

There are several ways to load jQuery and other resources. If you want to load them directly in your custom master page, there are also several places within the page to do so. Personally, I load them right under the CustomJSUrl line, like so: This way, they get loaded before any page content, but AFTER the vanilla SharePoint scripts.


0

You could upload Bootstrap and JQuery files to a document library in SharePoint and use the Script Manager to load them on the masterpage. <asp:ScriptManager id="ScriptManager" runat="server" EnablePageMethods="false" EnablePartialRendering="true" EnableScriptGlobalization="false" EnableScriptLocalization="true"> <Scripts> ...



Top 50 recent answers are included