Tag Info

New answers tagged

1

Look at line 5 in his code, he's removing the property for line wraps, rather, removing the stopping of the line breaks, thus allowing line breaks: $("nobr").css("white-space","normal"); // Lets labels wrap Remove that and that should help.


0

It's not clear exactly what you want to do, but OData $filter has a startswith that you should be able to use here. $filter=startswith(City_Name_EN,'M') See this page: http://msdn.microsoft.com/en-us/library/ff798339.aspx and do a find for "startswith". When in doubt, check the OData spec. SharePoint implements it for the most part, though there are ...


0

Where is the page for the iFrame hosted? If you're in an app or in another domain, it won't work, check out http://www.esqsoft.com/javascript_examples/iframe_talks_to_parent/ for more details.


0

You can try the below code for file upload: using (SPWeb web = SPContext.Current.Site.OpenWeb()) { SPList docLibrary = web.Lists["Documents"]; web.AllowUnsafeUpdates = true; Stream fStream = FileUpload1.PostedFile.InputStream; ...


0

This is working on my dev environment from a long time. I guess issue is with single and double inverted commas. Check this <script type="text/javascript" src='<SharePoint:EncodedLiteral runat="server" Text="<%$SPUrl:~sitecollection/Style%20Library/Scripts/jquery-1.11.1.min.js%>" />'></script> <script type="text/javascript" ...


0

Why you should not try like this: <script type="text/javascript" src="server-name/style library/scripts/xyz.js></scripts>


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 ...


0

The best way I have found to do this is to just go ahead and load them into your masterpage. Use this link here in the head: <SharePoint:ScriptLink language="javascript" name="MyJquery.js" defer="true" runat="server"/> The script link tag will always point to the /_LAYOUTS/1033 folder so put your JQuery file there. This line would load the page ...


1

If you go to your document library and click the Library tab at the top, look for "Open with Explorer". Click that and you will be able to drag and drop whatever files you need very easily. Click this button on both libraries on which you are moving files.


0

Maybe the soloution to this questing could help: How to brand my masterpage using provider hosted apps?


0

Try this and see if it works for you: $(document).ready(function(){ var control; control = findacontrol("your column name"); control.parentNode.parentNode.style.fontWeight="bold"; }); function findacontrol(FieldName) { var arr = document.getElementsByTagName("!"); // get all comments for (var i=0;i < arr.length; i++ ) { // now match the ...


1

using Jquery you can apply the CSS. $yourElement.css("font-weight","Bold"); // $(this).css("font-weight","Bold");


0

It does not seem possible to retrieve Publishing Image fields using SharePoint REST List Item endpoint. But there is a workaround, publishing fields could be retrieved using ListItem.FieldValuesAsHtml property via SharePoint REST endpoint as demonstrated below. How to retrieve Publishing fields using SharePoint 2013 REST function getJson(endpointUri, ...


1

Even you can use SpServices, its gives a easy way to get the attachments from lists on the basis of item ID.


1

Use SP.ListItem.attachmentFiles to retrieve the collection of attachments that are associated with the list item. How to retrieve list items with attachments using JSOM function getListItems(listTitle,success,error) { var ctx = SP.ClientContext.get_current(); var web = ctx.get_web(); var list = web.get_lists().getByTitle(listTitle); var items ...


1

In Sharepoint online you can not deploy files to the _layouts folder as there is no _layouts folder there. For Sandbox solutions, the Style Library is the correct location. If you are going to keep them in the Style Library can try referencing the scripts using the ~sitecollection replacement token (generally Style Library is only provisioned at the root ...


0

Do you have more that one web front end server in your SharePoint environment?


0

I had a similar issue once. What helped me is placing the js-File in the SiteAssets and referring it from there. What also helped was using jQuery instead of $ in front of every jQuery command and using _spBodyOnLoadFunctionNames.push("MyFunctionName"); function MyFunctionName() { // Code } to make sure all the other js-Files were loaded before ...


0

You could try to search for the error message span with class .ms-error and append the column title to your message element in the top of the form. Could be something like: $(".ms-error").each(function(){ $("#myValidationMessage").append($(this).closest("td.ms-formbody nobr").text()); }); You can add this to $(document).ready(), because the page ...


0

First of all, EncodedAbsUrl returns an absolute Url of a File, in case of List Item it has the following format: http(s)://[site]/[web]/[list]/[item id]_.000 In order to return attachments using SPServices GetListItems operation, the following query option have to be included: CAMLQueryOptions: ...


0

Should be using GetAttachmentCollection not GetListItems Can use GetListItems to get the ID from each list item. But to then get their attachments need to use this instead: http://spservices.codeplex.com/wikipage?title=GetAttachmentCollection


1

When you save a list as a template, it will not preserve the lookup column as the IDs of the source column from which it looks up might change causing the lookups to break. There are a couple of workarounds which you can try. Try this and this


3

If you look at the HTML SP renders for a peoplepicker you will see why your code is not working. But here's how you can attach an event to the onchange: $(".ms-usereditor div").bind('input propertychange', function() { alert("Onchange event" ); })


1

changing width in .ms-promlink-body is the simplest way. However if you have multiple promoted links and you disire to wrap a specific promoted link on a page, then you should define a new css in a script editor and name it something! like below: <style> .ms-promlink-body1 { width: 350px; } ...


0

If it is already working but you have to reload the page, just use location.reload(true); at the end of your function and that will solve your problem of having to refresh the page for it to show the change.


1

You cannot permanently modify an aspx page on the SharePoint server using JavaScript in the browser this way... You could implement a flag value in the user's local storage if all of your users' browsers will support it -- or you could use a cookie to track if the user wants this particular item hidden. Then in each case on the page load you would check the ...


2

These other answers tend to be too simple or way too complicated... ;) This should do what you want, you just might need to change the url variable and the select parameters to conform with your environment -- but I took my best guess based on the information you provided. You could also remove the jQuery reference if your page already has it. Here is a ...


1

This should do it. But you have to use jQuery and SPServices in order to make it work. You can create a simple HTML Select (If the options will not increase) or just can populate using SPServices in case that you list keeps growing. HTML: <select id="dropdown"></select> JS: <script ...


0

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"></script><script type="text/javascript"> // Execute the following JavaScript after the page has fully loaded, when it's ".ready" $(document).ready(function(){ //Set alert based on drop down selection ...


0

The error you are getting (I presume) is a side affect of the problem... YOu have a few miss-matched curly braces... I found this quickly just by copying your code and pasting it into a code editor... it highlighted the syntax issues... Try this: (function($){ $(document).ready(function(){ value = $('div[id="cl"]').length; ...



Top 50 recent answers are included