9

You can use the JSLink property to load multiple files. Include a url to the jQuery file and you have a nice workaround. Please note that you will have to use a url within the same web application, you can’t reference the library from a CDN or similar. Try something like this: $Field.JSLink="~sitecollection/Style Library/MicrosoftAjax.js|~sitecollection/...


7

If the page the JSLink is on is not referencing jQuery and jQuery UI scripts, you will need to load them yourself. This can be done by for example: function loadScript(url, callback) { // adding the script tag to the head as suggested before var head = document.getElementsByTagName('head')[0]; var script = document.createElement('script'); ...


7

Ok, solved it. The script links to the jQuery and jQuery UI files needed to have the language and type attributes set. This did not work: <script src='/sites/mysite/SiteAssets/Scripts/jquery-1.11.1.min.js' ></script> <script src='/sites/mysite/SiteAssets/Scripts/jquery-ui.min.js' ></script> <script> $(function () { ...


6

I'm sure there is room for improvement, but here is a working sample. jQuery(document).ready(function () { //narrow down matching to dialog boxes only if(location.href.indexOf('IsDlg=1') !== -1) { $(".ms-dialog td.ms-formbody > span > table > tbody > tr:first-child > td > span.ms-RadioText").each(function(){ ...


6

The whole essence of async REST calls is that they do not stall other code. SOD won't be of help because it has no clue you are waiting for other operations to finish Best thing is to handle those REST operations properly: https://stackoverflow.com/questions/3709597/wait-until-all-jquery-ajax-requests-are-done If you have no control over that code your ...


4

You can change your logic as below $(document).ready(function(){ $("select[title^='Drop'").change(function(){ var title = $(this).attr("title"); var selected = $(this).find("option:selected").text(); if(title == "Drop1" && selected == "") { $(select[title='Drop2']).hide(); } else{ $(...


4

Thanks for Tiago for providing the solution. So here is the code if you want to move description up for Multiple lines of text. $("td.ms-formbody > span > textarea.ms-long").each(function(){ var descriptionElement = $(this).closest('.ms-formbody').contents().filter(function(){ return this.nodeType != 1; }); var descriptionText = $(...


4

The another option can be to create new permission level in your site. From the site settings page, click the Site permissions link, then from the settings menu, click the "Permission Levels" menu item Click on the Contribute permission level, and scroll to the bottom of the page. Click the Copy Permission Level button to take a copy of it. Call the new ...


3

I usually use a variant similar to what eirikb describes in his comment: if(typeof jQuery == 'function') NotifyScriptLoadedAndExecuteWaitingJobs("jquery.js"); else if (LoadSodByKey('jquery.js', null) == Sods.missing) RegisterSod('jquery.js', '//code.jquery.com/jquery-1.11.0.min.js'); SP.SOD.executeFunc("jquery.js", "jQuery", function () { ...


3

You can use this to break out the string explicitly: var emails = $(this).attr("ows_UsersList").split(";#").filter(function(e){ return !parseInt(e)}) var emailsjoined = emails.join(";"); emailsjoined is the semicolon delimited string of email addresses.


2

Create a new calculated column in the list and enter the following formula: =[ColumnName1]&" "&[ColumnName2] I should add that you can use the calculated column to many things, please see this article for further use: Calculated Field Formulas Edited What you could do is to customize your listform in InfoPath. In this particular case you would ...


2

When the page goes to edit mode you can load the http://jqueryui.com/tooltip/ as dotsa suggested And then you should be able to attach the tooltip using the class or any selector say $( document ).tooltip(); Make sure that the fields you want tooltip are added with title attribute


2

Have you thought about adding code to detect the crawler and "unfurl" the accordion? For example you could look at the User Agent that is passed by the crawler.


2

I just did something similar for SharePoint 2013 but I'm pretty sure this works for 2010 as well. You can pass in special query string parameters to your views on a list, namely FilterFieldN, FilterValueN, and FilterOpN (where N is a number between 1 and 10). Example: http://example.com/lists/Tasks/AllItems.aspx?FilterField1=Title&FilterValue1=...


2

I do things a little differently with my JSOM code. I have a generic function and use deferred variables. Here is a working example that I used CDNS for. You should be able to drop this into a page and it will show a fullcal(although not with some of the other functions you defined) <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.2/...


2

Chrome does not respond to enter key because this event is associate to the href attribute, so I put my javascript inside the href //Datepicker jquery ui function ImproveDateTextBoxs() { $("img[id*=DatePickerImage]").closest(".ms-dtinput").remove(); $(".ms-dtinput input[id$='Date']").each(function () { ...


2

Yes what you need to do is open the server side file under program files\common files\web server extensions\12 (or version number) \ then under layouts you will see some ascx files. You may have to do a search. But those are sometimes used in many underlying _layouts aspx pages. You have dig in and see which relate to you. Looks like you are /project/...


1

I wrestled w/ this same problem when we upgraded to SP2013. I was attempting it on the client side in a content editor, and thus loading the ui libraries outside of the DOM Header, and I did not have success w/ the answer above (fully referencing the script library). The problem I discovered was a conflict with the jQuery "$" call method, as jQuery-ui also ...


1

You are passing two strings (name and WOGLicensetext) to your AppendData function, yet in the function you are trying to access a result object, which probably doesn't exist in that scope. So you should change $("textarea#idTxtArGenHtml").append(result.WOGLicensetext); to $("textarea#idTxtArGenHtml").append(WOGLicensetext);


1

Thanks to Submits help for achieving my scenario. Here is the complete solution for the same. It will read the Image and Title from a library and when you click on it you can redirect to another page. <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js "></script> <script type="text/javascript" language="javascript"> ...


1

This isn't the most elegant solution, so feel free to tweak: var row = document.createElement("tr"); var j = 0; for(i=0; i<this.pictureArray.length; i++) { //alert(this.pictureArray[i]); if (j == 0) txtHTML += "<tr>"; var fgh='http://google.com'; var res = this.pictureArray[i].split("/_t/"); var fin=res[1].split("_JPG....


1

Check out this threads. http://spjsblog.com/2012/02/24/form-field-tooltip-for-sharepoint-2007-and-sharepoint-2010/ You'll have to modify add/new/edit forms of the list or document library you are working with. Then you can use any of the numerous tooltip js libraries i.e. http://jqueryui.com/tooltip/ to add tooltips to your form.


1

SPServices uses the old SOAP service API, which although are deprecated, they continue to be a very fast API - especially for GetListItems... In your follow up answer above, you show a snippet of code calling SPServices in synchronous mode (async: false) - meaning: your entire browser will "freeze" until the request is returned from the server and your ...


1

Try this- slight change in the HideColumn function function HideColumn(Column,IsHide) { if(IsHide=="True") { $('nobr:contains("'+Column+'")').closest('tr').hide(); $('nobr:contains("'+Column+'")').closest('tr').nextAll().hide(); } else { $('nobr:contains("'+Column+'")').closest('tr').show(); } }


1

This will work only if the drop-down control has an option with empty value. Try below $("select[title='"+Hide_Column+"']").val(''); Another option is to select the first option as below $("select[title='"+Hide_Column+"']").find('option:eq(0)').prop('selected', true);


1

There are a number of ways to handle this, but here is one: Create a solution package that deploys the files directly to _layouts. Put each version in a separate folder, for example _layouts/jQuery/1.11.1/ and so on so you can introduce new versions without breaking solutions built on older versions. As far as referencing jQuery in your pages, you can add ...


1

Try to put your function into OnPostRender like this: SPClientTemplates.TemplateManager.RegisterTemplateOverrides({ OnPostRender: function(ctx) { as described here: CSR and form templates and here: Modifying ListForm Save & Close button through JsLink


1

I ran into a similar scenario where I had to set specific authors, since you included a powershell code sample here is the powershell I used to make the changes. Be aware this goes through all posts and asks if you want to change the author on each one. It also changes the editor as well. Please take the time to read the script before using, and be sure to ...


1

You can read listitem properties from following code: function retrieveListItems(siteUrl) { var clientContext = new SP.ClientContext(siteUrl); var oList = clientContext.get_web().get_lists().getByTitle('Announcements'); var camlQuery = new SP.CamlQuery(); camlQuery.set_viewXml( '<View><Query><Where><Geq><...


1

You can bind a click event to an image using jQuery in the same way as you would with any other element (though this really isn't a SharePoint question): jQuery('yourselector').click(function() { console.log('Image clicked.'); }); If you're trying to read and compare list data, you should read up on SharePoint's JavaScript Client Side Object Model.


Only top voted, non community-wiki answers of a minimum length are eligible