Tag Info

Hot answers tagged

3

There is no built in way via the SharePoint JavaScript Object Model according to my research. Likely you will have to build your JavaScript to work with the SharePoint 2010 Alerts Web Service: http://msdn.microsoft.com/en-us/library/websvcalerts(v=office.14).aspx using JQuery or whatever framework calls from JavaScript on your page.


3

The error may be throws because core.js loaded before init.js (because FV4UI function is part of init.js file). Also, check this post. <!-- the following 5 js files are required to use CSOM --> <script src="/_layouts/1033/init.js"></script> <script src="/_layouts/MicrosoftAjax.js"></script> <script ...


3

The problem is likely because you are using jQuery 2.0 which does not have support for IE 6/7/8 or IE 9/10 when running in compatibility mode (which I'm guessing SP 2010 is using. You can confirm this by using the F12 developer tools). I would recommend using jQuery 1.9.1 for use with SharePoint and so you still have support for the older browsers.


2

Does it help if you set the ContentType parameter of your post like: $.ajax({ url: _spPageContextInfo.webServerRelativeUrl + "/_api/web/lists/getByTitle('Eleves')/items", type: "POST", contentType : "application/json;odata=verbose", data: JSON.stringify( { ...


2

The webTemplate property is not exposed by the SP.js in 2010. (It is however in 2013: http://msdn.microsoft.com/en-us/library/jj838541.aspx). However, there is a JS variable written to the page with the web template name: g_wsaSiteTemplateId. Without any server-side code, etc., that would be the only identifying mark of the template.


2

Here is some js that should load efter the ribbon is loaded: SP.SOD.executeOrDelayUntilScriptLoaded(function() { // Your code here }, "sp.ribbon.js"); More about modifying in this blogpost Edit: // Fires ‘ribbontabselected’ after the ribbon has been initialized after load ExecuteOrDelayUntilScriptLoaded(function () { var pm = ...


2

Just wrap your code inside the uploadMyFile function into ExecuteOrDelayUntilScriptLoaded, as shown below: <script type="text/javascript"> $(document).ready(function() { $("#some-a-element").click(function uploadMyFile(directory)) { ExecuteOrDelayUntilScriptLoaded(function() { // something ...


1

have you found the solution? I am also facing the same challenge. Thanks. Update: I am facing same problem but I am able to print. Please refer This Link Hope this link will help others too. Please let me know if you can explore more. Thanks.


1

In my case I needed to know the language before the SharePoint javascript libraries are loaded in order to hide elements before they are shown on the screen (not possible with _spBodyOnLoadFunctionNames). Turns out SharePoint sets the lang attribute of the root HTML element according to the language and as a bonus it's already translated to the "en-us" ...


1

Good way to remove handlers from dialog's close button is using $clearHandlers Method. Check code below: function fValidateBeforeClose(event) { var isValid = true; //set IsValid value if(isValid) { //close dialog SP.UI.ModalDialog.get_childDialog().close(); } else { alert('Not valid'); } } function ...


1

To work with the SharePoint JS library you must have the SP.js at least: <script type="text/javascript" src="/_layouts/SP.js"></script> <script type="text/javascript" src="/_layouts/SP.UI.Dialog.js"></script> <script type="text/javascript" src="/_layouts/SP.Core.js"></script>


1

This works, but I need to be able to construct the user object from the currently logged on user. Shouldn't be too difficult I hope ! var users = new Array(1); var user = new Object(); user.AutoFillDisplayText = "Ian Chivers"; user.AutoFillKey = "i:0#.f|membership|ian@kwsservices.onmicrosoft.com"; user.AutoFillSubDisplayText = ""; user.AutoFillTitleText = ...


1

My problem solved - Upon examining the DispForm.aspx page in SharePoint Designer, as I have mentioned before, the content of the Multiple Lines Rich Text type column is displayed using the XSLT code - <xsl:value-of select="@Progress_x0020_Comments"/> The solution is to include the attribute "disable-output-escaping" and set it to "yes" So the ...


1

please refer to this answer that i answered about the minimal download stratergy ;) External access gives a blank home page to stop it do the following: go to: Site settings > under Site Actions section > manage site feature now disable the feature MDSFeature and it will keep on that link instead of redirecting ;)



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