Questions tagged [javascript]

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.

Filter by
Sorted by
Tagged with
0
votes
2answers
1k views

Unable to execute javascript user function within Content Editor

Trying to implement some javascript functions within the content editor. I have more advanced code to implement, but am not able to even execute the following code. The user defined function will not ...
0
votes
1answer
282 views

Multiple Asynchronous query chaining

I have a Sharepoint 2013 application that has multiple (3) ExecuteQueryAsync calls in 3 different functions. Two of them are referring to the Project Server project context, and one is referring to ...
-1
votes
3answers
2k views

convert asp.net code to WebPart code issue [duplicate]

Possible Duplicate: How to use JavaScript and CSS in a web part? I am using SharePoint Server 2007 Enterprise with Windows Server 2008 Enterprise. I am developing using VSTS 2008 + C# + .Net 3.5 +...
-1
votes
4answers
1k views

pros and cons of using using the “FilterField1” & “FilterValue1” appraoch to build an advance search and filtering for my document library

I am working on a sharepoint farm 2013 on-premises. and i am searching for an appraoch which can allow me to build an advance search and filtering for my document library. currently my document ...
-1
votes
2answers
2k views

Retrieve SharePoint List Filter Selected Value with Javascript

I would like to retrieve the Selected value from a SharePoint List Filter to use in a url. I have the following code in a CEWP on the same page as the SP List Filter that returns an alert box to test ...
-1
votes
3answers
15k views

How to retrieve files inside folder in document library using javascript

I need the code to retrieve files from folders in document library
-1
votes
1answer
119 views

Get Recent date using Javascript

I want to get the Max date in the column Date1. This is my code : function RetrieveLog() { var getItemsUrl = "/_api/Web/Lists/GetByTitle('" + ListName +"')/items?$select= ID,Title,Date1,LastDD"; ...
-1
votes
3answers
404 views

Show/Hide fields in SP

The below code is JavaScript to show and hide fields. What I would like to clean up is and include fields in an array instead of individual if else statements(all Internal Fields - All External Fields)...
-1
votes
4answers
6k views

How to add script reference on master page?

I have applied master page using JavaScript in my SharePoint Hosted App. This script reference is added on default.aspx. Now I want to add script reference on master page which I have applied so that ...
-1
votes
1answer
2k views

Calls to WebProxy without an app context are not allowed

From SharePoint 2013's default.aspx page (https://somecompany-public.sharepoint.com/pages/default.aspx) I'm trying to call a RESTful json API which lives outside the SharePoint domain, but getting ...
-1
votes
2answers
2k views

What is managed code. Is javascript a managed code?

What is managed code. Is Java Script a managed code?
-1
votes
1answer
672 views

Is it posible to upload file in Lists Attachments in SharePoint in custom way

Is it posible to upload file in Lists Attachments in SharePoint in custom way I already tried using REST and JS but I am facing an error and it can't upload if it's posible kindly suggest what way to ...
-1
votes
1answer
69 views

Javascript doesn't work for the users except System admin in SharePoint 2010

i made some changes on a JavaScript which is hosted in my sharepoint. But the changes don't work for All users except System admin. Any help? Here's the code: Change.Track = function (FileName, verM,...
-1
votes
1answer
66 views

Convert String as Property

var listType = document.getElementById('ddlLists').value; "ddlLists" is an Id for a dropdown list and "listType" variable is having the selected dropdown list item as string type. i want that the "...
-1
votes
1answer
487 views

javascript countdown in html code of homepage [closed]

I added a javascript in a contenteditor on my homepage, the javascript is a countdown to a specific date in days. When I put it in my HTML it works well, but after a day the counter shows me first ...
-1
votes
1answer
667 views

Fetch the SharePoint field values using SPServices in a EditForm.aspx in SP 2010 Listform

I need to fetch the SharePoint field values using SPServices in a EditForm.aspx in my SP 2010 Listform. As far as I know, some examples, one of them - I tried below - used to fetch the current logged ...
-1
votes
2answers
101 views

JS not working when user is a reader

I have a JS that displays something in a page, when I login as a Reader, it doesnt display anything (when I debug the JS using IE Dev tools, it runs but ends at some point) But when I login as a ...
-1
votes
2answers
5k views

Can we use javascript to display attachment filename of a list item?

I just need the attachment filename of list item to display in a display page, not the link. Let's say List name: MyList and item ID: 1 When I try to use the ajax and I did some test. Somehow it ...
-1
votes
1answer
2k views

Check it in error sp.ribbon.js

Recently I've started getting this error when trying to 'Check it in' while looking at a page. The error in the JavaScript console is: SCRIPT445: Object doesn't support this action File: sp.ribbon.js,...
-1
votes
1answer
780 views

input box in sharepoint to add entry, popup

I have a button, when i click on button i need a popup which should have textbox and a button "ok". in textbox i can enter numerical values like 10, 12 etc and click on ok button. Later ok button ...
-1
votes
1answer
535 views

SharePoint Client-Object-Model - Return List Item Counts by Created Month

Looking to get monthly totals of items from a list using the SharePoint COM/SP Services. My intention is to pass this data to a D3 chart.
-1
votes
2answers
2k views

Disable the Drop down column based on the text value…!

I am working with SharePoint 2010 form library. I have a drop down column which is dependent on text input column value . The value in the Text input column comes from the infopath form. What i ...
-1
votes
1answer
48 views

how to alert message in sessinStorage

I have a button on my update page. This button redirects and refreshes the page after sending sms I want that; If the user pushes the button and sends sms 1 time, do not press the same button 2 ...
-1
votes
1answer
40 views

JavaScript code on working on SharePoint Online list

Hope you're well; I am adding JavaScript code into content web part. However it is not working. I'm i mising something out.
-1
votes
1answer
182 views

Theia Sticky Sidebar doesn't work in SharePoint

My HTML template use Theia Sticky Sidebar - and it works in plain HTML. When this HTML is transformed to SharePoint masterpage and layouts the script doesn't work.
-1
votes
1answer
2k views

How to use document.body.appendChild to add in html row

I am very new to programming , And I had written the code to create the "input control" . And I am able to make it , But I need to place the input control in html table row "txtHTML = txtHTML + "...
-1
votes
1answer
174 views

How do I get the text from this HTML? [closed]

In a SharePoint scripting web part How do I get to the actual text (All systems...) from this in JavaScript (It was read in from a list using REST) ? "<div class="...
-1
votes
1answer
118 views

how to modify date time column format in to minute interval in list form “Sharepoint online”

Using If Else statement I'm comparing "expire date time" column with a current date before submitting the newform.aspx, but if I put the expire date time at 8am with the condition (current date<=...
-1
votes
1answer
161 views

Using SPUtility script with If Statement

I am currently using a PreSaveAction script to check a field to make sure it is filled out before saving the form. However, while testing different situations, I realized that if "Reviewer 1" rejects ...
-1
votes
1answer
3k views

Sharepoint Online : Rest API POST method getting - 415 (Unsupported Media Type) OR 400 (Bad request)

Im new on SharePoint online and i want "POST" (update my list) with Ajax First step : var listName = "Creation de projet"; var url = _spPageContextInfo.webAbsoluteUrl; var itemId = "18"; // Update ...
-1
votes
1answer
10k views

How to add 14 days on Date by JQuery [duplicate]

I have Date in SharePoint server 2013 and I want to add 14 days on it by jQuery I have the column name EndDate text type.
-1
votes
1answer
34 views

Need Help with SP2010 calculated or scripted field based on multiple other colums of data

In a SP2010 environment, I have a couple challenges. I have a list of records that I need to add a calculated field (we'll call this column "STATUS Ratio) for each persons record. Each record has ...
-1
votes
1answer
716 views

Caml query with more than 2 or conditions [closed]

var fieldName; var listFields; var CmalQuery; $(document).ready(function () { $('#btnSearch').on('click', function () { txtValue = $('#txtSearch').val(); ...
-1
votes
2answers
593 views

Error when loading list item using JavaScript

I am trying to load list item properties when a user selects a list item from the asp:ListBox. However, I am constantly getting an error with the message that the request is invalid. Could someone ...
-1
votes
1answer
304 views

Javascript to submit Web Part without click

From a previous question, I am able to populate a textbox with a value I can use to reference another list. However, in order for this functionality to be as user friendly as possible, I would like ...
-1
votes
1answer
1k views

Getting list items in SharePoint Hosted App for Office 365

I want the code snippet for Getting the list items and Show it in the App page. I'm creating SharePoint hosted app for Office 365. How do i get the list item values? Thanks in Advance
-1
votes
1answer
32 views

Redirecting a Form to it's Original Position in Sharepoint Library [duplicate]

I have a Sharepoint Library which has Thousands of Forms. If i submit a form the pointer should point out that particular form which i have closed.
-1
votes
1answer
762 views

GetListItem SPServices don't retrieve data

i'm trying to retrieve data from Sharepoint using SPServices. I created a list called "values" with two field: "Title" (text field) and "values" (numeric field). I created a js file linked to a ...
-1
votes
1answer
375 views

get a randomly picked background image to appear as the background image for a Div

My HTML Contains 1)have js file contain java script function function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min)) + min; } document.getElementById("logoArea")....
-1
votes
1answer
76 views

count items in the list

function onSuccess() { var longest = ""; var listString = ""; var Count = 0; var listEnumerator = listCollection.getEnumerator(); while (listEnumerator.moveNext()) { var currentItem = ...
-1
votes
1answer
560 views

Function expected _spFormOnSubmitWrapper

I have overridden SharePoint ribbon save function using _spFormOnSubmitWrapper() on my js code. I am getting "SCRIPT5002: function expected" error when I try to check in page when debugger ...
-1
votes
1answer
72 views

Get the proxy authentication once we click on a specific page

SharePoint 2013 request: we need to display the proxy authentication window once we click on a specific page link "/index.aspx" .... it can be done using JavaScript ???
-1
votes
1answer
789 views

Remove user from group Javascript

Hi I followed another thread but cannot get the following code to work. I changed Line 8 from web to oWeb, error seems to be around line 8/9 I'm trying to remove a user from a group. function ...
-1
votes
1answer
651 views

Get selected item ID to display in customized DispForm javascript

I'm using SharePoint Online and have a SharePoint-hosted app. I have a page with a question form that send data in to SharePoint. I show my question form in my DispForm for my list (I added my app as ...
-1
votes
2answers
152 views

:net contra Javascript [closed]

If do some client programmering, what factors should I take it into consideration if I gonnna use javascript/ECMAScript or .net in relation to retrieve some functionality from SharePoint and apply it ...
-1
votes
1answer
21 views

Sharepoint 2013: Moving a field o be side by side with another field doesn't save it

in an list/EditForm.aspx, I have the following code to copy/paste a field to another place: var dest = $('span[title="MyTitle"]').parents("tr:first"); // place to be copied var source = $("input[id*='...
-2
votes
1answer
695 views

Add/delete list item using knockoutjs

I need knockout js code to add/delete a list item. Any ideas?
-2
votes
1answer
199 views

Can anyone fix this code

I'm trying to follow a tutorial to customize the appearance of the announcements list, however, they don't provide downloadable files and the code they provide on the web page is messed up somehow and ...
-2
votes
2answers
292 views

Random Javascript is causing errors

There is a site wide change that I cannot figure out the root cause of. I am getting the following errors on every page in the site collection: Upon inspection of the error taking place at "...
-2
votes
1answer
27 views

taking user to particular site collection on clicking webapplication url

I have 4 users who has access to 4 different site collection,when he clicks on the webapplication url he should see only the site collection that he belongs to.he wont be able to see other site ...