Web scripting language.
0
votes
1answer
216 views
SP.Web.EnsureUser(user) does not seem to work. (JavaScript Client OM)
Supposedly, SP.Web.ensureUser(user) works according to this MSDN link but I cannot seem to get it to work in my JS code.
While debugging, I can see that SP.Web exists and the user variable is ...
0
votes
1answer
674 views
Filter a SharePoint-List as you type with Javascript/jQuery
so my scenario is: My users don't like the filter technology provided in SP2010 Lists and Listviews (using the row-titles' dropdown) and likes to have a "normal" textbox and search the splist (one ...
2
votes
1answer
112 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
615 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
295 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
262 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
401 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
152 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
90 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
84 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
34 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
317 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
141 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
87 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
515 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
766 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
201 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
335 views
Remove ribbon entirely on certain page?
Can this be done with SharePoint Online?
Failing that, for an entire site?
Thanks.
0
votes
2answers
397 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
266 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
267 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
467 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
115 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
297 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}&ItemId={ItemId}&ItemUrl={ItemUrl}"/>
...
1
vote
0answers
90 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
282 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
139 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
101 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
750 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
357 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
290 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
116 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
256 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
36 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
378 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
62 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 ...
