Tag Info

Hot answers tagged

5

I guess you could always use a site collection token in your URL. ~sitecollection URLs and tokens in SharePoint 2013 If that don't work out for you, this blog post has a lot of great examples when working with masterpages and references. Use Site Url in SharePoint Update Try using a scriptlink instead. I'm unsure if encoding is needed thought. Try to ...


4

You can use below mention CSS to fix the height of all multi line textbox whether it is in list view or in quick edit view. .ms-rtestate-field { max-height: 100px; overflow: auto; width: 250px; word-wrap: break-word; } Change the height & width as per your needs. Apply this CSS in SharePoint master page if you want to to work for all ...


3

Mark, See if this can help you. If you are writing the custom code this can set you the starting point.


2

In your custom page layout first add path to .js file (put path to src="") and then code. <script src="jquery-1.8.3.min.js">//<![CDATA[ //]]> </script> <script>//<![CDATA[ $(document).ready(function(){ //some code }); //]]> </script> <!--MS:<Publishing:EditModePanel ...


2

You can create your own file control in HTML and hook it up with the below script. I use an asynchronous loop to iterate through the files. //Enable Multiple Upload Script $('.attachmentButton').change(function(event){ //alert("change"); //startUpload(self, function (){ reloadPage(); }, event); $("#WSOutput").html("<b>Please wait while ...


2

Please write below mention code outside the For-loop & try it. var ctx = new SP.ClientContext(appweburl); var appCtxSite = new SP.AppContextSite(ctx, hostweburl); var web = appCtxSite.get_web(); //Get the Site var list = web.get_lists().getByTitle("wbslist"); var listCreationInformation = new SP.ListItemCreationInformation(); var oListItem11 = ...


2

Ok, here's what's happening: // select ALL elements that are .block .title h2 span and loop through them $(".block .title h2 span").each(function(index) { // find the length of the text of THIS PARTICULAR element var x=$(this).text().length; // if the length of THIS PARTICULAR element is > 29 if(x > 29) { // change the ...


1

For clarity, this is how I addressed the problem above. Wrapping the function calls in a function that explicitly waits until the client context is loaded helped to delay the AJAX calls long enough to make sure that they all were executed successfully. No need to use async:false in the AJAX. //writes CSS classes to body script based on explicitly checked ...


1

After some more analysis, I resolved the code above. Looks like the conversion from SP2010 to SP2013 changed the value the javascript was looking for in the dropDownList. var theSelect = getTagFromIdentifierAndTitle("select","Lookup",fieldName); I changed the Lookup to LookupField and the JavaScript above started working again.


1

You can also add your scripts in the following section too. <SharePoint:DelegateControl runat="server" ControlId="AdditionalPageHead" AllowMultipleControls="true"/>


1

For Relative Path in sharepoint you can use any of the two: var url = window.location.protocol + "//" + window.location.host + _spPageContextInfo.siteServerRelativeUrl; Or we can use var context = new SP.ClientContext(); var relativeWebUrl = context.get_url(); var fullWebUrl = window.location.protocol + '//' + window.location.host + relativeWebUrl ;



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