Web scripting language.

learn more… | top users | synonyms (1)

2
votes
1answer
111 views

Why is SP.js is not registering for Anonymous Users?

In SharePoint 2013 I tried: ExecuteOrDelayUntilScriptLoaded(function () { alert("Hi"); }, 'SP.js'); But SP.js is not registering for anonymous users.
6
votes
4answers
602 views

ExecuteOrDelayUntilScriptLoaded too slow in Firefox and Chrome

I want to use CSOM but waiting around 2 or 3 seconds after page load before I can even do my first query is crazy! See below. Using jQuery dom ready shows a reasonable ready time, but SP.ClientContext ...
4
votes
2answers
272 views

How to avoid caching issue when using custom JavaScript and CSS deployed under _layouts?

On our farm, I'm deploying some JavaScript and CSS files under the _layouts folder. I'm then referencing them, where it's required using a <SharePoint:ScriptLink> or a ...
3
votes
2answers
255 views

SP 2010 JavaScript events

I want to hook into certain events on a SharePoint 2010 site, specifically the modal dialog open and close events. Does SharePoint 2010 trigger any events for these kinds of actions? If so, how do I ...
1
vote
1answer
389 views

Unable to get correct element on a sharepoint page using document.getelementbyid('<%textboxID.ClientID%>')

I have a sharepoint website which has multiple instances of the same visual webpart. On button click I am trying to get a textbox present in the usercontrol of the webpart using ...
1
vote
1answer
149 views

Is there a way of inserting javascript function as an onclick attribute, or href attribute to a hyperlink in sharepoint page

So, is it possible to add a link as follows (or some equivalent to this) <a href="javascript:somefunction()">Click Here</a> into the Sharepoint page, but without using Content Editor ...
0
votes
0answers
89 views

UpdateListItems ajax call is successful but does not return created item

I want to create a new list item and store the created item's ID in a variable for later usage. So I'm using UpdateListItems and making an ajax call and then in the success callbakc function ( ...
2
votes
1answer
83 views

SharePoint - Detect Silverlight Version and upgrade if necessary?

My Silverlight 5 app is hosted in SharePoint Online. It doesn't load (sticks at 100%) for users who have Silverlight 4 versions. How should I upgrade those without the latest version to Silverlight ...
0
votes
1answer
18 views

Disappearing Images

I am still new to Sharepoint and I am trying to upload some files from my staging area to production. Everything work in staging however when I move the files to production, I noticed that there are ...
0
votes
0answers
31 views

Problem with add java script to set All Resources by default view in calender

I would like to add All Resources view by default in my calender but I can't find way how I can do this in standard calender. I started look for some solution this issue and I found below blog site ...
4
votes
3answers
300 views

Commit modal dialog and then display notification

I have a modal dialog that I commit by calling window.frameElement.commitPopup(), and this is great because it refreshes the parent window. However I would also like to display a notification on the ...
0
votes
0answers
84 views

Update xml file with doc library with xlst/jquery (limited com stuff)

is there anyway to write/update an xml file within a document library, with js/jquery from a page, or with xslt or anything like this I am unaware of? I am really asking for some context I lack, and a ...
0
votes
1answer
137 views

Server side validation if Javascript disabled on user's browser

I have developed a small form with 3 input type = text and one input type = submit button. The end user fills the form and submit it, but no data inserted into backend List. (probably empty form is ...
3
votes
1answer
86 views

Checking if the content database is in read-only using javascript?

Hi I'm pretty new to SharePoint and javascript. I am trying to check if the content database is read-only, and if it is then preform a function eg. if ...
2
votes
2answers
507 views

How to retrieve Sharepoint list data in master page

I have Created Custom Master Page. and i want to access SharePoint List Data in this Master Page using JavaScript. I write the following script to access data but it gives error that ...
3
votes
2answers
756 views

CustomAction: UrlAction to open link in a new window

I have added a menu item to the Personal Actions menu by creating a CustomAction like so: <CustomAction Id="myCustomAction" GroupId="PersonalActions" ...
2
votes
1answer
199 views

How can I get specific SharePoint site GUID using javascript/jquery

For example: I have a site under this url: http://intranet.contoso.com/news When I open it i would like to read it's GUID for future use in my custom AssetPortalBrowser.aspx url picker. Thanks!
0
votes
0answers
53 views

How can I manipulate sharepoint ajax calls into the pipe line?

I built a SP server code that , (I don't know why) make some trouble into the client side code. When the page is loaded for the first time, I notice that every single item in the page, they are not ...
0
votes
0answers
175 views

Error while Updating Sharepoint 2013 List from Apps [closed]

How to update SharePoint Site list from SharePoint 2013 Apps ?? When we access list from app which is already create on site, Its giving error like access denied ?
2
votes
3answers
325 views

Remove ribbon entirely on certain page?

Can this be done with SharePoint Online? Failing that, for an entire site? Thanks.
0
votes
2answers
396 views

Add multiple people using Javascript Client Object Model to a Field of Type SPFieldUserValue

I want to update a UserField client side. I found the following code at this topic How to Use ECMA CSOM to Set a Field of Type SPFieldUserValue Tried the following code: var users = new Array(); ...
4
votes
3answers
1k views

How to access list in SharePoint Hosted App?

I want to create an Sharepoint hosted app but how to access list in these App ??
4
votes
3answers
255 views

Unable to set “End Time” of Calendar through Javascript

I am trying to set default value of "End Time" field in Calender NewForm.aspx page. Here is my code: var txtDate = $("#" + $("label:contains('End Time Date')").attr("for")); var cboHours = $("#" + ...
2
votes
1answer
262 views

How to perform rowcount with a web service in Sharepoint 2010

Pagination loses some of it's luster with no knowledge of the total number of results. Is it possible to perform a "row count" with either REST or SOAP (getListItems) without getting back all of the ...
1
vote
0answers
464 views

Filtering SharePoint list items that have multiple values using jQuery

I have a SharePoint list that contains multiple columns of information. There’s a Category column that’s a look up to another list called ‘Category’. This is to produce unique ID’s for each of those ...
4
votes
1answer
114 views

Getting ctx for a specific webpart

My goal is to replace a text in a specific column by an icon using only javascript. function ReplaceTxtbyIcn(targetWP, targetColumn, pat, urlname) { var table = document.getElementById(targetWP); ...
1
vote
1answer
294 views

Getting the Item ID from the ECB (Edit Control Block) using JavaScript

I know I can use {ItemId} to pass it to the URL like so: <UrlAction Url="~site/_layouts/ConvertItem/ConvertItem.aspx?ListId={ListId}&amp;ItemId={ItemId}&amp;ItemUrl={ItemUrl}"/> ...
1
vote
0answers
86 views

display InputFormSection

Can we hide an wssuc:InputFormSection ?? I have a wssuc:InputFormSection made for adding items and it's only shown when you click on add link as the code shows : <Table border="0" width="100%" ...
1
vote
1answer
120 views

How do I convert this code to JQuery

I've been trying to convert this code to jQuery from Javascript but to no avail. This code is for adding a new item to a list which I took from the msdn website. It works in javascript but I need it ...
1
vote
3answers
280 views

How to load page load javascript when update progress is over

How to load page load javascript when update progress is over. $(function() { // how to load this after update progress is over } Explanation My Grid inside update panel.. In Grid some of ...
2
votes
1answer
35 views

SP Tools help - Not returning results

I have downloaded SPTools from github, and have followed the directions of uploading the files to a Document Library. When I try to open the index.html file from the document library, I get prompted ...
1
vote
0answers
63 views

Updating a value of any item in a list based on a selection of bool for one item - jQuery

So I hope this makes sense. I have a column within a list that I want to use as an active flag. There are 5 possible categories and for each category there can only be one active value. So I need some ...
4
votes
1answer
138 views

List Picker Dialog

I am attempting to use LaunchPickerTreeDialog js method to launch the OOTB SharePoint list picker. It works fine when selecting a list within the current web application however if I pass a parameter ...
1
vote
1answer
100 views

Site Template with Custom Pages: css, javascript?

If I create some custom pages that include custom html, css and jquery and this page exists within a site that is used as a site template, will that cause issues? From my limited experience with this ...
1
vote
2answers
148 views

Can sp.js be used in 2007?

I'm trying to use the code found at http://msdn.microsoft.com/en-us/library/hh185010(v=office.14).aspx under the section 'Adding a Web Part To A Page With Javascript'. However I cannot get a reference ...
4
votes
2answers
733 views

sharepoint 2013 rest api upload image

I want to upload image or create image in Sharepoint 2013 document library using rest api (Javascript) my code to get bite array from input type file element is var reader = new FileReader(); ...
1
vote
0answers
57 views

changing language on application page

I am using following code to change the language of HTML form on application page: <asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server"> ...
0
votes
1answer
353 views

Adding Javascript function on custom aspx page

I have created custom ASPX page in Visual studio for my SharePoint application. I want to use JavaScript function on this custom page like this: function ChangeLanguage(value) { var today = new ...
2
votes
4answers
282 views

Why does jquery's document.ready not fire?

In my master page, I have attached jQuery along with my own custom.js. I use the javascript in that file to run fixes on my pages such as style adjustments. Now, when I run simple functions on my ...
1
vote
1answer
92 views

tabbing out of menu item in sharepoint

When we are using tab key and we reach the site actions or welcome menu and press enter we can get inside the menu and then we can tab through the options.The issue I am facing is that when the last ...
4
votes
0answers
115 views

SharePoint XML Web Part dynamically adding xml link

Is there a way to dynamically insert a variable in the <XMLLink> --variable here--</XMLLink> tag? I'm trying to read an URL parameter which will contain the xml files path. What I am ...
0
votes
1answer
249 views

How can I get the ID/Name of the selected DocumentLibrary using JavaScript in MasterPage?

I want to get the ID/Name of the DocumentLibrary when I Click/Select on any library from List of libraries from the Left Panel of MasterPage. Can I call the function from MasterPage or where ? How ? ...
0
votes
1answer
35 views

Userfeedback after file was uploaded to library

I need to print out a feedback after a file was uploaded to a DocLib. I tried several things over the event receiver (add statusbar as a control or a clientscript) but everything faild. I´m a bit ...
0
votes
0answers
40 views

Cancel Ajax Request in Webparts

In my visual web parts used in modal dialog, I have used a UpdatePanel and added an initializeRequest function and an endRequest function like following: <script type="text/javascript"> ...
2
votes
1answer
375 views

access a list in a subsite with Javascript

How can i access a list in a subsite? function Read () { var caml = "<View><ViewFields><FieldRef Name='Title'/><FieldRef ...
1
vote
1answer
66 views

Access a Sharepoint site from event handler

my problem is that I want to pop up a status bar in SP2010 after a File was uploaded via a single uploadform to a List. Found this in the net: ...
0
votes
1answer
60 views

Change Language in ModalDialog without reload

I´ve got the following issue: I want to change the Language of a .aspx Page, the NewForm.aspx. Therefor I created a WebPart which was added to the NewForm. <div> <a href="" ...
1
vote
1answer
2k views

How to return a value using context.executeQueryAsync?

How can I get this function to return the value? In all the examples I have seen, folks use an alert in the delegate functions, but I need to return the value instead. When I call the function, it ...
0
votes
0answers
70 views

Update WebPart MenuItem/Verb from Client Side

Here is the scenario - I have a custom webpart where I added one custom menuitem with client side handler, now my requirement is when I click on the menuitem some text should be shown, for example ...
2
votes
1answer
458 views

Calling Upload Dialog with javascript, can I pass value through to the edit form that follows?

I have a button that opens the upload dialog from a page using the below approach: function openUploadNewDocumentDialog(passingID) { var dialogOptions = SP.UI.$create_DialogOptions(); ...

1 2 3 4 5 15