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


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

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


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


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


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


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


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


2

I'm using this: <script type="text/javascript"> var loginName = ""; var userid = _spPageContextInfo.userId; GetCurrentUser(); function GetCurrentUser() { var requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/web/getuserbyid(" + userid + ")"; var requestHeaders = { "accept" : "application/json;odata=verbose" }; $.ajax({ url : requestUri, ...


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


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

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>


1

Here are the sites you may want to read: CSR - Client Side Rendering The SharePoint 2013 programmers way http://www.viewmaster365.com/#/How Yes you can display HTML/Javascript without the need for CSR, in a Calculated Column How to use Today and Me in Calculated column How to display Today calculations in a View with JavaScript in Calculated Column (or ...


1

Maybe you can use the BASE tag <head> <base href="[url]"> </head> http://webdesign.tutsplus.com/articles/quick-tip-set-relative-urls-with-the-base-tag--cms-21399 http://stackoverflow.com/questions/1889076/is-it-recommended-to-use-the-base-html-tag



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