Hot answers tagged

8

Check http://sharepoint.stackexchange.com/a/52877/35604: <script type="text/javascript"> function Custom_Submit(command) { SP.Ribbon.PageState.Handlers.showStateChangeDialog(command, SP.Ribbon.PageState.ImportedNativeData.CommandHandlers[command]); } </script> <input type="button" onclick="javascript:Custom_Submit('...


7

There's not a huge difference for all of them. 3 out of 4 of them are server-side controls. And the SharePoint:InputFormTextBox and wssawc:InputFormTextBox are the exact same, only the prefix namespace (i.e. SharePoint, wssawc) is the difference. SharePoint/wssawc:InputFormTextBox has built-in co-operative field validation, the others don't. That's the ...


6

Add an id: <pre id="myId" .... And then hide it with jquery: addNewTest = function() { $('#myId').hide(); }); or without jquery: addNewTest = function() { document.getElementById('myId').style.display = 'none'; });


4

You wanna target the specific webpart where you wanna change the link color, otherwise every link on the page will change font color. Use F12 Developer tools to find the ID of the specific webpart you wanna change the link text for. Insert the name/ID instead of my example (#WebPartWPQ5) and then use the CSS i provided below (SP2013). <style type="text/...


4

Find id of that WP. Something like WebPartTitleWPQ4. Edit that page and insert script editor WP and add <style> <style> #WebPartTitleWPQ4 h2 { background-color: #000; color: #fff; } </style> EDIT Find where is title. For ex. <style> #WebPartTitleWPQ4 h2 { background-color: #000; } #WebPartTitleWPQ4 h2 span { ...


4

A ductape patch is adding a negative margin-top <div style="margin-top:-200px"> YOUR CONTENT </div>


3

You are using jQuery already, so rather than use the regular onClick, can you take a different approach altogether, and use jQuery to wire up a click event handler? That way you can call your function like you do in line 649. I'm thinking a different approach like this: $("#head"+i).click(function(e) { startWorkflow(id, anbieter); e.preventDefault()...


3

You should be able to insert your HTML code in a copy of the default master page you are already using, download it locally and and then publish it and set it as masterpage for your sites using O365 dev PnP Powershell cmdlts. As i'm not using O365 myself i haven't been able to try it out but should be doable. OfficeDevPnP.PowerShell Commands There are ...


3

Here is a minimal HTML file that will make use of SP.UI.ModalDialog: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet" type="text/css" href="/_layouts/15/1033/styles/corev15.css"/> &...


2

This is an XML Namespace definition. In this case, SharePoint has defined an XML Namespace with both its prefix and URN set to "ie". In the interests of not duplicating information, I've added some links from within StackExchange that provide a good understanding of what you can do with XML Namespaces: http://stackoverflow.com/questions/1181888/what-does-...


2

You need to render the rich text. Just add STSHtmlDecode like in this example. <div id="trimmedDetailsDiv" class="newsListItemBody" style="padding-right: 0px; color:#656565; font-size:15px; padding-bottom: 25px;"> _#= STSHtmlDecode(shortDescription.value) =#_ </div> SharePoint 2013 - Working with Display Template for Content Search Web ...


2

Depending on what you are using the html files for, you can try changing the extension. For example, call a file content.html.txt. One thing I store html files for is to link them to content editor web parts. In that case the extension doesn't matter.


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.


2

There is an WebPart called PageViewer-WebPart you can use for this purpose. Here's some reference for that: https://support.office.com/en-us/article/Display-a-Web-page-on-a-SharePoint-page-by-adding-the-Page-Viewer-Web-Part-7f61feec-9b3d-4805-a960-07636ba59527 You may have to take care of the 'SAMEORIGIN' security, but there are a lot of references on how ...


2

HTML: <div id="wrapper"> <div class="float left">left WP zone here</div> <div class="float right">right WP zone here</div> </div> <div class="bottom">bottom< WP zone here/div> CSS: #wrapper {width:600px; height:300px; position:relative;} .float {background-color:black; height:300px; margin:0; ...


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


2

This site allows you to create a timer, then it outputs the code for you. You can edit as needed.


2

I tried it now in SharePoint 2013 and with SharePoint Designer. First you have to do the steps Amit described here: show-list-fields-side-by-side Open the site which contains the list in SharePoint Designer 2013. Select the List from List and Libraries section. Select your list. Under the forms section, click on New. On the popup, provide your form name ...


2

No jQuery and easier to continue with var names=document.querySelectorAll(".ms-subtleLink"); names.forEach(function(name){ var fullname.innerHTML; //change fullname your way name.innerHTML=fullname; });


2

There is no issue with the equals sign, the issue is with the ampersand, that has to be escaped as &amp; http://stackoverflow.com/questions/1328538/how-do-i-escape-ampersands-in-xml There are 5 characters that need to be escaped in XML: " &quot; ' &apos; < &lt; > &gt; & &amp; http://stackoverflow.com/questions/...


2

First, put all the styles in a css file and upload it to the Site Assets library, then you can reference it in couple of ways to do this: Option 1: Site Settings ==> Under Look and Feel ==> Master Page ==> Alternate CSS URL and enter the URL to your custom css file, like this /SiteAssets/CSS/styles.css Option 2: Edit your master page (always make a ...


1

If you're not going to use InfoPath then you're definitely going to be looking at creating a custom form using HTML and some other custom logic to do the submission for you. The lowest barriers to entry will be JavaScript on the client, or C# in a provider hosted Add-in or server solution. I strongly recommend you consider JavaScript (REST or the JavaScript ...


1

So remember, for all intents and purposes, an External list, for all that it gets its data from an external source is still a SharePoint list. If I am url is spSnippet.com, external list is called ExternalList and the field I need is FieldForDropdown (real imaginative I know) then my code is simply: using(SPSite spSite = new SPSite("http://spSnippet.com")...


1

Clicking (4) might be possible with javascript and hooking into events (closing the modal window of the new item form, for example), but clicking (5) is not. You can't control the click action in Outlook using javascript executing in a browser.


1

In Office 365, I created a new site (not a personal site). I then opened the site in SharePoint Designer and imported the files into Site Pages. I renamed index.htm to index.aspx I right-clicked on index.aspx and set it as the home page. This works for single html page sites. For multi-page websites you will need to rename all html files to an ...


1

This is because the Browser File Handling option in the Web Application General Settings of SharePoint is set to strict by default. The options are permissive and strict,if you change it to permissive it will work. But unfortunately since you are trying in SharePoint online you cannot do that change. The only option for you is to change the file to .aspx or ...


1

Using Sharepoint Designer, if I created a HTML page in the root of my site collection, the page opens in the browser as expected. As soon as I dropped it into a document library, it downloads the file. So it looks like you need SharePoint Designer and do not store the files in a document library. This isn't entirely ideal as you lose out on a lot of ...


1

If you're querying a list and outputting the results then I would recommend using the ASP.NET Repeater control/pattern (https://msdn.microsoft.com/en-us/library/zzx23804(v=vs.85).aspx) - essentially the precursor to Razor templating, a Repeater lets you use HTML 'templates' data-bound to a data source. Here's a real-world example from some code I'm writing. ...


1

I figured it out myself Title Search: <input name="Title" type="text"/> <a onclick="location.href=this.href+Title.value;return false;" href="/sites/203/qaos/bp/Lists/Process%20Tickets/AllItems.aspx?View=&amp;SortField=ID&amp;SortDir=Desc&amp;FilterField1=LinkTitle&amp;FilterValue1="> Image</a>



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