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
1answer
261 views

Can I disable MDS on a single web part page

I have a custom list on a custom web part page with scripts that affect color coding as well as clickable attachment icons. These scripts do not execute when the list is grouped, and the groups are ...
0
votes
1answer
2k views

Is it possible to write a CAML query that will update or insert an entry based on its existence?

I'm working with Sharepoint using CSOM and Javascript. I need to cache usage statistics in a List with one entry per user, updating values in a user's list entry when they interact with the site in a ...
0
votes
2answers
870 views

Get the title of the item in detailed view (JavaScript)

When I click on an item in a list I get to the detailed view. There I need the title of this item. I could find it in the title of the page (when you look on the tab of your browser) but I think it's ...
0
votes
1answer
67 views

The choice SELECT doesn't work, only 1 value boots, and there is a lot of them, help with a code

$().SPServices({ operation: "GetListItems", async: false, listName: "Telekom Group", CAMLViewFields: "<ViewFields><FieldRef Name='Title' /><FieldRef Name='Name' /><...
0
votes
1answer
2k views

O365 Patterns and Practices JavaScript Injection / Embed JavaScript

I have a vanilla O365 developer site which I'm deploying the app in the JavaScriptInjection example here - https://github.com/OfficeDev/TrainingContent/tree/master/O3658/02%20Managing%20site%...
0
votes
1answer
51 views

client side IDs of share point elements

I need to hide some menu items that come OOTB on sharepoint pages. I can do this through javascript/jquery, but am not sure how consistent are the client side IDs of various elements on SP pages. I ...
0
votes
1answer
931 views

Reset sharepoint lookup with None option using jquery

How to reset the lookup value to None in Editform.aspx page using Jquery. I want to empty the lookup dropdown if text box does not have any value . Here is the code which i have tried.I was able to ...
0
votes
1answer
850 views

Fill textfield with JavaScript

I have a textfield which needs to get the value of a variable. When I select the <input> by it's ID, and use jQuery.val(variable) I get [] as output (Chrome Developer Tools). When I use ...
0
votes
1answer
118 views

Issues with height when setting app part width and height via postMessage

I'm currently using the postMessage function to set the width of my app part which is working however I've got a few issues with height. The height is set using $('.container').outerHeight(true); ...
0
votes
1answer
161 views

Javascript to display defaulteditform in modal dialogue used by sharepoint

Does anyone have the javascript required to display the defaulteditform in the modal dialogue that SharePoint (v2010) displays an edit form in ? I'd like to add this to my html ?
0
votes
1answer
351 views

Javascript running only in edit mode

I have included a js file in the content editor but it runs in the edit mode only. I have tried all the suggestions like Including text/javascript Include code between execfunc() But it still doesn'...
0
votes
1answer
38 views

need to update the item in the list

I have a list called revision. It has a columns called wbscode and revisionnumber. Wbscode contains code of the project(eg.pcode1) and revisionnumber is to store revision number done for the pcode. ...
0
votes
0answers
95 views

Setting Url Variable for Sub site

I'm trying to create news list system. I wanted to set Url Variable via Javascript and get the item back by id to display details. Everything went good but when I try to href /subsite/pages/default....
0
votes
1answer
24 views

Working on a Support Wiki, have some embedding questions

I'm trying to embed javascript that would allow me to create HTML links that open in new windows of a specific size. Is this possible and, if so, how?
0
votes
1answer
263 views

Auto-populate a list column with a sequential number

I am experiencing major issues in trying to upload the package.json and sputility.jquery.json files onto our SharePoint Online 2013 site as advised in the SPSE post: ''Before beginning the ...
0
votes
1answer
1k views

Javascript and add user to Active Directory group in Sharepoint

How to add user to active directory group? How can I add user to the Active Directory by the javascript code. I have got a script which adding to Sharepoint Group, but how Could I do it with Active ...
0
votes
1answer
246 views

Is there a way to expand and filter using a substring in the Sharepoint API?

I'd like to expand files and filter using a substring like so: Is it possible? /sites/Training/_api/web/lists/getbytitle('production_library')/files?$expand&?$filter=substringof(%27https://...
0
votes
1answer
1k views

$.getscript returning 'undefined'

I am trying to get the script found under 'Enforce Drag and Drop documents to apply metadata' to work and I am always getting an 'Undefined' error here: $.getScript("path_to_my_custom_js_file/...
0
votes
1answer
984 views

How can I manage folders and files using rest api?

How do I use rest API to pull data from folders and files? Each set of files are associated to one particular folder. I'm not sure how the are associated and I need to pull certain fields associated ...
0
votes
2answers
1k views

Retrieve all files from all folders

I've a picture Library which contains to folders i've retrieved them by this code getListItems('myList'); function getListItems(listName) { var clientContext = SP.ClientContext.get_current(); var ...
0
votes
0answers
615 views

Access denied while calling external URL ajax call

I got the access denied error when i am calling external URL from Ajax call. it is working fine without SharePoint 2010. <script> function httpGet(theUrl) { debugger; var ...
0
votes
1answer
42 views

Can we use jslink for builtin application pages for specific type of lists?

Can we use JSLink for built-in application pages for specific type of Lists? What possible ways we can add CSS and JS to specific out of box List application pages? May can use JSlink?
0
votes
1answer
2k views

Style selected item row in a connected List View Web Part - SP2013

Currently, a selected item in a connected LVWP is only indicated by a filled, black diagonal arrow icon. I would like to add background color formatting for the selected item row. Note: I am not ...
0
votes
2answers
42 views

Javascript location

I am trying to create tabs using this code http://jsfiddle.net/yZYtL/ I have implimented the HTML and CSS OK but the I am unsure where the Javascript should go? I have an existing javascript in use ...
0
votes
1answer
939 views

Selecting an input field on a newform.aspx path with Javascript without using jQuery

I'm looking for an object that contains the form field ids or something similar. Something similar to the _spPageContextInfo object for form fields. Anyone have an idea? EDIT: This code I'm using ...
0
votes
1answer
242 views

How can output Title, Email and phone from User Profiles

I found some code that outputs from user profiles and works but it only outputs Manager. How can this be changed to output Title, Email and Phone number? var managerName; $().SPServices({ ...
0
votes
1answer
54 views

SP2013 Multilinetextfield event?

When you edit text in a MultiLineTextField which allows rich text, SharePoint switches to "Format text", every time this happens our custom ribbons disappear (they are added with JavaScript). The ...
0
votes
1answer
2k views

How to Sign-In with Sharepoint from the Javascript?

I used the following code to access the sharepoint from javascript var soapDataString = "<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/...
0
votes
1answer
868 views

get items between do two date REST API [duplicate]

can i get the list of items between two date like ? var startDate. var EndDate. var queryGetDiscussion = "?$Date between(startDate, EndDate) "; Or using LT and GT.
0
votes
1answer
91 views

Custom javascript changes are overwritten by default javascript

I tried changing the background color of the left navigation list items when an item is clicked.When its clicked,it shows the effect but when the content in the page layout loads,the color is changed ...
0
votes
1answer
521 views

Can I jump to a specific div ID based on the results of a specific variable passed from another page?

I am trying to jump to a specific section on my page, but I need to do it after the document.ready has completed. When I click from page 1, information is added to the end of the URL depending on ...
0
votes
1answer
3k views

How to get the value of the PeopleEditor in SharePoint 2013

I need to get the value of the PeopleEditor using JavaScript and jQuery. following this article : http://www.andrewconnell.com/blog/Using-JavaScript-jQuery-to-get-the-value-of-the-PeopleEditor-in-...
0
votes
1answer
91 views

JSOM context newly created id reference when creating more than one item

I am using the COM JavaScript/jQuery to get, create & update some list items. I have two lists and every time I create a new item in one list, the newly created id is something that I want to grab ...
0
votes
1answer
533 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
1answer
416 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
0
votes
0answers
51 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
382 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
2answers
753 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
476 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
1answer
513 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
2answers
175 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
696 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"?> <...
0
votes
1answer
275 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 ...
0
votes
0answers
51 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
1answer
93 views

adding more than one list item into List at a time when the items are generated dynamically (using NAPA)

I am using the below code to insert an item into the list. function createitem() { var selectListBox = document.getElementById("txtFormName"); var selectedListTitle = selectListBox.value; var ...
0
votes
3answers
680 views

How to load multiple item

I'm using SharePoint 2010. I'm trying to load mutliple selected item from a view in a ribbon on a custom list. I can have the selecteditems but when i try to display a value for an item, i've an ...
0
votes
1answer
1k views

How to change the name of an attachment in a new item before the item gets saved?

I have a regular list, and the NewForm.aspx page is opened as a modal dialog. When a user wants to add a new item to that list and adds an attachment to that list, I'd like to be able to change the ...
0
votes
1answer
1k views

Error Unable to get property 'getEnumerator' of undefined or null reference

Getting the following error when running my script: Unable to get property 'getEnumerator' of undefined or null reference My code : NBSFeedbackEditInbox.FeedbackRemove = (function () { var ...
0
votes
1answer
472 views

Issue while deleting a list using CSOM in a SharePoint App

I am having this weird issue while deleting a list using CSOM. My SharePoint App has 2 buttons - one to create a list and the other to delete the created list. When the app loads for the first time, ...
0
votes
1answer
712 views

CAML Query works in U2U CAML Query Builder, but not SharePoint

I built a CAML query using U2U CAML Query Builder and it works when I execute it in the builder, but when I go to JSOM in SharePoint, I get the entire list and none of the filters from the query work. ...

1
95 96
97
98 99
102