Tag Info

Hot answers tagged

3

.hide is part of the jQuery framework. Loading jQueryUI won't give you that function. //Load jQuery first <script src="/SiteScripts/jquery.js"></script> //Then jQueryUI <script src="/SiteScripts/jquery-ui-1.8.24.min.js"></script>


2

I believe you need to use XMLHttpRequest for this var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function(){ if (this.readyState == 4 && this.status == 200){ //this.response is what you're looking for handler(this.response); console.log(this.response, typeof this.response); var img = ...


2

Try this $(document).ready(function () { var curResType = $('input[title="ReservationType2"]').val(); $('input:radio[value="' + curResType + '"]').each(function () { $(this).prop('checked', true); }); }); Or you can altogether avoid looping $(document).ready(function () { var curResType = ...


2

The following selector worked for me: $('td.ms-vb-user a:contains(NOTAPPROVED)').closest('tr').css('background-color', '#f5a9a9'); User fields do not get the ms-vb2 class applied to them (at least not in my views in O365).


2

By using the hints Anders provided and the reference here. I can make it work with below script. Simply put it into a Script Editor Webpart for the page you need it. <script language="javascript" type="text/javascript"> function DoSomethingWithRibbon() { // Gets a reference to a CUI.Ribbon object (CUI.js) var ribbon = ...


1

Unfortunately the absolute URL isn't the best, but it's something :) You'll better need to have the site relative URL for the file, which you can pass then to GetFileByServerRelativeUrl available in Web object, using the correct Web where the file is. This method is available also in CSOM and REST API, so you can build and issue the REST query directly from ...


1

You could do it with javascript I guess, the name of View is Ribbon.Read, so this should work: SelectRibbonTab('Ribbon.Read', true);


1

Consolidate into one file. Advantages are big, and disadvantages don't really exist, as you have full control of the functions/variables (sure, you can make mistakes, but you can do that otherwise as well), and browsers cache the JS file, but remember to enable BlobCache.


1

Instead of separate file you can also use CSR/JSLink here. That way you can consolidate all the function for each of the form in one JavaScript file. You simply need to use JSLink option for those pages(Newform.aspx, DispForm.aspx and Editform.aspx). Here is the examples for JSLink(CSR): Client-side rendering (JS Link) code samples Using JSLink to ...


1

Your site is being loaded with securely https protocol and your font awesome file is being loaded using http protocol. That is why the browser is blocking the content loading of that font awesome file (It's the default behavior of browser). You need to always click on that alert button or else if possible download the font awesome file and place into ...


1

Hi i have just put up a fiddle for you,updated fiddle hope that helps SCRIPT $('#mycalendar').fullCalendar( { header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay' }, dayClick: function( date, allDay, ...


1

If you are using a radio button that means you will be able to select only one of them every time, so instead of looping them why dont you validate your condition when one of them is clicked? It would be easy and faster than looping and then checking any one of them e.g.: $(function(){ $("input[name='EventSet']").click(function(){ ...


1

You should change your approach. Instead of setting value on Save Click, try setting on change events $('input:radio[name="EventSet"]').click(function(){ var resVal = $('input:radio[name="EventSet"]:checked').val(); if (resVal != undefined) { $('input[title="ResField"]').val(resVal) } alert(resVal); ...


1

Try <script> $(document).ready(function(){ $('#formTbl tr').filter(function () { return !$(".ms-standardheader", this).text().match(/Name|Title/i); }).remove(); }); </script>


1

I am not sure why it didn't worked using hide. One problem might be the script is getting executed prior the table gets loaded. Here is another way to do the same $('.EventRow').css("display", "none");


1

I needed a simple method to determine if there was at least on error in a form field on any of the tabs. Because ms-error is present in the DOM before an error has occurred (people picker), I had to find a different way. Also, because different fields render the error message in different ways, I had to account for all methods in my form. What I ended up ...



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