Javascript is a dynamic computer programming language, most commonly used as part of web browsers, whose implementations allow client-side scripts to interact with the user, control the browser, communicate asynchronously, and alter the document content that is displayed.

learn more… | top users | synonyms (2)

0
votes
0answers
7 views

SharePoint 2013 Change default start time and end time on calendar event

We're scheduling a lot of similar events, so the start time is almost always 8:30AM and the end time is almost always 5:30PM (not necessarily on the same day). Is there any way that we can set the ...
0
votes
1answer
22 views

open links in modal view from page layout

I have found how to open any link in modal view thanks to the JS OpenPopUpPage* on publishing pages. I would like to use this also with the links I have in my page layout (created by snippets), so ...
0
votes
0answers
9 views

WOPI iframe on Sharepoint list attachments

I really like this new functionality of the SharePoint search that shows you a document preview on mouse hover. Is there any way to make the save document preview in list item? In the search it looks ...
0
votes
1answer
27 views

Run javascript code only in publish page not in edit [duplicate]

I am running some javascript code in on page but I don't want it running when I try and edit the page. How can I stop this from running in edit page and only when the page has been published
2
votes
3answers
41 views

Injecting Javascript into SP2010 List - Need to make sure I have the right ID

New to Sharepoint 2010, but not new to coding. I have created a custom list with 4 text input fields and I am trying to target one of the fields called SUID with custom Javascript to modify how the ...
0
votes
0answers
28 views

CSOM: SP is not defined

Here is my error: Uncaught ReferenceError: SP is not defined $_global_portal (anonymous function) SP is not defined and the source is portal.js?rev=nIRSxJH7DAoMFUDBHc9jFg%3D%3D:1 ...
0
votes
1answer
34 views

How to move/copy a document set via JavaScript CSOM

Could somebody give a JavaScript CSOM example of how to move/copy a document set from one document library to another? The document set has a derived content type with a list of metadata, and it ...
2
votes
1answer
53 views

Sharepoint Deployment not updating webparts

Alright. I have just made changes to a custom webpart that was already deployed to Sharepoint. I made a few deploys, some changes... and suddenly, a code that was in the front-end of the webpart ...
1
vote
0answers
16 views

SharePoint Hosted App duplicate calendar issue

We developed SharePoint Hosted App and released 1.0.0.0 version for first time into App Store. Later with some Enhancements we released 1.2.0.0 version and published into App Store the problem is ...
0
votes
1answer
39 views

Send item link by email? (EDM SP2013)

Is there a way to directly send an item link by email? I have a SP2013 based EDM. I know that docs URL are available in a popup, but I don't want to copy/paste link: I would like to be able to click ...
1
vote
3answers
41 views

How to debug Napa SharePoint app

I've made a simple app in "Napa" Office 365 Development Tools. It's a SharePoint app that returns the current site lists. This is the rest call: site + /_api/web/lists When i debug this app it ...
1
vote
1answer
25 views

SP.ClientContext is not a Constructor

I keep receiving the error message "SP.ClientContext is not a Constructor" every time I try to use it in my JS code. After doing a bit of research online, I found SP.SOD.execute function(). However, I ...
0
votes
0answers
14 views

From root site, link that creates new item in a specific list / link to newform in a specific list - javascript

I have a teamsite. On the welcome page (root) I want to have a link to newform of a specific list inside the site collection. When I click on the link I want it to redirect me so I can create a new ...
0
votes
0answers
14 views

How could i delete old items in select tag option before adding new?

I am trying to do the following: every time an item gets added in my select option remove the old ones and only display the new added in my select option? Right now it deletes all items and only show ...
0
votes
1answer
27 views

How to include JavaScript in a list instance's form in Visual Studio

So I know you can use JSLink to include JavaScript files in list definitions in Schema.xml like so: <Form Type="DisplayForm" Url="DispForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" ...
0
votes
0answers
19 views

How do I access a Custom List from a client web part via the REST API?

I am using the following code to try and access my newly created Custom List called Announcements: $.ajax({ url: appWebUrl + "/_api/web/lists/getbytitle('Announcements')/items", method: ...
1
vote
1answer
61 views

Where is /_layouts/15/SFS.Ashok.Refer/scripts folder located in SharePoint Designer 2013

I'm editing a JS script file using SharePoint Designer and would like to upload it on to /_layouts/15/SFS.Ashok.Refer/scripts .Where is the folder stored on the SharePoint Designer?
0
votes
0answers
15 views

Async Refresh LVWP on load with HTML Form Param

I have a List View WebPart that I need to asynchronously take a parameter from an HTML form WebPart and update the LVWP. I have some odd behavior happen when I attempt this. I have Async Load, Update, ...
0
votes
1answer
21 views

SharePoint cascading drop down on visual web part using client side code

Hi I am working with cascading drop down in a visual web part. I am able to complete this functionality using c# but I want to implement this functionality using JavaScript jquery basically I want to ...
0
votes
1answer
36 views

SharePoint visual webparts for NewForm with client side coding

I need to use visual web parts to create a new item form for a list. I know I can do this by using SSOM.. But I want to reduce the load on the server Can I use CSOM?.. Or is CSOM mainly for sandbox ...
0
votes
0answers
8 views

Get date before and after and query out free dates on range

When double booking in calender, the user get prompted to an dialog where Current day and +1 och -1 on day and then display the free dates, doing all this code wihout +1 om fromTime, and -1 on toTime, ...
1
vote
2answers
33 views

Apply script to a calendar view every date navigation

I have a calendar view in Sharepoint Online and my user wants the time hidden. I manage to hide this using Javascript but the problem is that when I navigate to another month view, the script no ...
0
votes
0answers
13 views

How do I access an image library from my client web part via the REST API?

I am busy implementing a small web part to rotate through a list of banner images. The images must come from an Office365 SharePoint online list. My first choice to implement this list is by using the ...
1
vote
1answer
24 views

Creating an app to pull in announcements via JSON

I have the code to pull in my data, but I'm new to Sharepoint and need some help. Where can I find some resources to figure out how to get started. I'm used to building stand-alone sites with HTML, ...
3
votes
1answer
50 views

Can I immediately call a function when selecting data in a SharePoint 2010 choice field?

I am trying to show/hide other fields depending on the choice selected from a specific choice field in my SharePoint form (NOT InfoPath). I can get it to work using "onfocusout" but that does not work ...
1
vote
0answers
17 views

Get the last rated item in a SharePoint list

we have a SharePoint list with social rating feature enabled. On the homepage I want to display the "Latest Voted Item" of that list. Is it possible to get the last rated items in a SharePoint list ...
0
votes
0answers
15 views

How to retrieve items from Camlquery

How can I retrieve items from the date range below: 2014-12-07 08:00 to 17:00 2014-12-08 08:00 to 17:00 2014-12-09 08:00 to 17:00 With my query right now I am receiving 2014-12-07 08:00 to ...
2
votes
2answers
55 views

Dealing with JSON data in Sharepoint

I'm interviewing for a company and they asked me to put together some demos for them. They have a platform they use on top of Sharepoint and I would be working extensively in it (this is a junior ...
1
vote
2answers
57 views

How to remove user from Sharepoint Group using JavaScript?

I want to add and remove user to/from Office 365 Group. I tried using C# code but got error : "User does not exist or is not unique". After searching on the web I can't find solution.So i tried ...
0
votes
0answers
24 views

How to get days 5 days before and 5 days after

I want to query items from a calender list 5 days before current selected date from datepicker, and 5 days after selected value from datepicker? This code takes the selected datepicker date from ...
0
votes
1answer
25 views

ReferenceError: itemID is not defined (JavaScript)

I'm trying to grab data from an external list using ecmascript. I'm running into a slight problem. I'm not getting an error popup, however, in debugger mode it's referencing the above error message ...
0
votes
1answer
18 views

How to determine authenticated status on client side?

Do you know any syncronous way to get IsAuthenticated status for currentRequest in client side via javascript? I can get current user via client model, but it will be asynchronous. ...
0
votes
2answers
25 views

Retrieve choice menu item from list

I have a list 'choiceOpt' which contains a choice field 'choiceOptions' having Yes ad No as options. I want to retrieve this Yes and No programmatically (javascript) . Kindly help.
0
votes
0answers
12 views

Retrieve items from calender List only get first item

I am trying to get all items from my calender list i want to get EventDate and Enddate, here is my code, function onQuerySucceeded() { var startCon = listItemCustom + "T" + "08" + ":00" + "Z"; var ...
2
votes
1answer
34 views

SharePoint online refer custom css and javascript in MasterPage (Site Assets)

How to add references to css and js files in HTML master pages. The files are residing in SharePoint libraries.
0
votes
0answers
13 views

Array EventDate And EndDate

I have two arrays 1 for EventDate and One for Endate from my calender List, var listItemEnumerator = collListItem.getEnumerator(); while (listItemEnumerator.moveNext()) { var oListItem = ...
0
votes
0answers
11 views

ECB custom action item issue

I deployed a custom ECB item action, I can see it at item level but when I click on it, nothing change. This is the definition of the custom action: <?xml version="1.0" encoding="utf-8"?> ...
1
vote
1answer
13 views

Removing the href from the day number link in a calendar

I'm creating a calendar for work requests into the team, I want to limit the view to month only which I've done by hiding buttons etc with css and a little Javascript, if you look at the image below ...
0
votes
1answer
29 views

Loop true list using csom

How do i loop true, items in calender list in SharePoint, right now my code only displays the first value from the list and not the second, Can someone help me? function onQuerySucceeded() { var ...
1
vote
2answers
48 views

Find the startpage of current web using javascript?

I want to hide a "div" from all startpages/welcomepages. But I cant just compare "start.aspx" and my url parameter cause sometimes the page "start.aspx" isn't there in the url. Is there a way to know ...
0
votes
0answers
15 views

Set external content type by javascript

In the NewForm, I need to set an external Content Type lookup field by javascript. How can I do it?
0
votes
0answers
13 views

How to split EventDate and EndDate

i am trying to split on "," working with eventdate and endate but i dont get it to work. (undenified) var listEventDate = oListItem.get_item('EventDate'); var listEventdt = new ...
1
vote
1answer
22 views

SP2013: Changing Width to Home Page Web Parts

The issue that I'm having is that I would like to change the width to the web part zone on my site home page. I want to change the width of the left web part zone so that it moves a few inches from ...
0
votes
0answers
8 views

Display items that are free to book and not items dates that exists

I have 2 items in my list right now it only displays that my first item in the list are busy and not the second also, because i have to items in the list, any suggestions'? function ...
0
votes
1answer
29 views

Get List Items from list linked by lookup

I'm making a JavaScript extension for form elements. The goal is to bind it to a lookup and react on change. Since I'm weak at webservices, I'm using SPServices. var lookupFieldInternalName = ...
-3
votes
2answers
45 views

Get all items from list

How do i get all items from list? Here is my code, function checkFreebookingdateTime() { getListCalender = document.getElementById('CalenderListDrop').value; spHostUrl = ...
0
votes
0answers
5 views

Unable to set collListItem or nullreference

Here i am trying to get the items from the dates between 8-17 on the date 12-04 The result works fine, I am trying to do the same using an SharePoint-Hosted app, Here is my code, it takes the ...
1
vote
1answer
41 views

Proper way to call multiple functions using SP.SOD.executeFunc

I need to make sure sp.js is loaded before I call several functions. I currently call them as follows in SP 2013. It works, but I suspect there is a better/more efficient way. ...
0
votes
1answer
62 views

Error:Input string was not in a correct format. (Javascript)

I'm using SharePoint 2013 online and trying to save a item to a folder content type in a document libary I think the code is nearly rigth but i am getting this error when i hit save button have anyone ...
0
votes
0answers
12 views

Uncaught ReferenceError: $ is not defined Page.aspx

I want to READ list data from with the help of RESTAPI in SharePoint. I use below code to do the operation. <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> <script ...