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)

1
vote
1answer
547 views

SharePoint 2010 Modal Dialog on Page Load

I have created an application page that mimics an input form. This form will eventually go into an SP List with other forms. What I'm after is when a user clicks the link to the form from the SP ...
1
vote
0answers
378 views

How to get the return value of an on demand executed function?

I have a script file MyScript.js in the folder TEMPLATES\LAYOUTS\MyProject\Scripts which looks like this: var MyCompany = window.MyComapny || {}; MyComany.MyProject = MyComany.MyProject || {}; ...
1
vote
0answers
242 views

Change Ribbon Button Enabled-Function

I want to change the EnabledScript function of a existing Ribbon Button (Upload Document) but keep everything else, like the original CommandAction it executes on click. More specifically I would like ...
0
votes
0answers
217 views

How to add and delete items in SP list using multi select box?

My question is that I am using a multi select list box to insert selected data to sharepoint list and I am using ecmascript object model. <select id="dd" multiple="multiple"></select> ...
0
votes
0answers
221 views

Modal Dialogue for List Edit Form

Working to create a link to a modal dialogue box which contains the edit page for a list item. Background: I'm using SPServices to query a custom list, and render the data in a HTML table formatted ...
2
votes
1answer
387 views

Run JavaScript after “group by” in list has been clicked on and list data loaded

I have created a JavaScript function to take a url from a list item and turn it into an image. This function works great on a list that doesn't have group by setup. With this script the images will ...
1
vote
2answers
281 views

How to include a 'yes' and 'no' button on the PreSaveAction() on the EditForm.aspx to return true/false accordingly?

I am simply looking to use the PreSaveAction() in a content editor web part as an extra cautionary step prior to saving a list item. Here is what I have: function PreSaveAction() { alert('Are ...
1
vote
1answer
272 views

Load page error when I use ScriptLink in the page head

Here is the beginning of my custom SharePoint Application Page: <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, ...
0
votes
1answer
67 views

SharePoint List add comments as formatted text

I'm not sure if this is even possible but thought someone must have done something similar. What I'm looking for is the ability for a user to enter a "comment" and that comment populate another field ...
1
vote
0answers
459 views

Javascript in CEWP queries a list every time dropdown is changed on NewForm.aspx not working

I am trying to apply javascript in a CEWP to a NewForm.aspx page of a simple custom list. Basically, the idea is to auto-populate a text field on the new item form whenever a dropdown column's ...
1
vote
2answers
3k views

SharePoint COM - SP.ClientContext(siteUrl) - Object doesn't support this action

Using the SharePoint COM to update a list item, but my function is failing. function updateProjectEC(projID, totalEC) { if(totalEC !== 0) { console.log("projID: " + projID); ...
1
vote
1answer
418 views

Get values from one list where a value is present in another list

I have 2 lists with a parent child relationship. List A ID Title ---------------- 1 First 2 Second 3 Third List B ID Title List A Lookup ---------------------------- 1 ...
1
vote
0answers
156 views

How to add a choice field in JS Grid control

I need to add a choice field (dropdownlist) in each row of a JS Grid control. What is the PropertyID for a choice field. How to add a dropdown. Please assist. i tried like this,but this didnt work ...
2
votes
2answers
92 views

Can you set a JavaScript to execute periodically?

Relatively new to SP, and can't seem to find anything definitive on whether a JavaScript function can be set to execute daily, or at some other period. Currently have a utility function page with ...
0
votes
1answer
52 views

My IE developer tool indicates that my Community site (Discussion forum) page have received 5.56 MB when clearing the browser cache

I have built a community site inside my SharePoint 2013 server. and on the discussion forum home page , I have captured the network for the page using IE developer tool. and it shows that it have ...
1
vote
1answer
86 views

Should I use ECMAScript from within a user control or visual web part?

It seems to me that I could use ECMAScript from within a user control or a visual web part, but which is the more efficient in terms of resource use, speed etc?
1
vote
3answers
372 views

Using javascript to apply “noindex” to get SharePoint to avoid crawling certain content

I have a problem with navigation elements being crawled on our SharePoint site. These elements come from a custom control that's used for building the site navigation, so the output is just html that ...
3
votes
2answers
350 views

Creating a SharePoint Wiki Page via JavaScript and REST or CSOM

I'm fairly new to developing SharePoint 2013 Apps, and I was tasked to customize the Create New Wiki Page for a Site. The user has to type in the Title, I do some processing, and then when everything ...
0
votes
1answer
419 views

Execute javascript function after all async postbacks

Just upgraded to SP2013. I have some javascript functions that need to be run after every (I'm assuming) async postback i.e. when a view is filtered or paged, so I can modify content in the view. ...
0
votes
1answer
158 views

Mega-menu tab on multiple site collections

I would like to create a tab in SharePoint 2007 that is a mega menu. This mega menu tab will be implemented on multiple site collections. It will be a part of the global navigation in each site ...
1
vote
1answer
221 views

CSS and js UX optimization for 2013 master page

I've been trying to optimize the user experience of a 2013 site that has an entirely custom responsive-design master page. So far, the only recommendation I've come up with is "Put your CSS links at ...
0
votes
1answer
388 views

SharePoint Apps Getting the GUID of App-Provisioned List using JavaScript and CSOM

I'm a Sharepoint App beginner. I have a SharePoint 2013 App that provisions List. How can I get the GUID of those list using CSOM and JavaScript? Here's what I got so far: var lists; ...
1
vote
1answer
1k views

How to get file or list item icon in SharePoint 2013 using javascript

My requirement is i have to display files from document library with images using javascript object model or spservices. pls let me now is there a way.
0
votes
2answers
149 views

Access DVWP z:row with Javascript [duplicate]

I need to loop through the z:row of a Data View Web Part on the client using JavaScript to push to an array and then use the JavaScript CSOM to create a new list item in an existing list. var ...
0
votes
0answers
97 views

Trying to get list of groups a user belongs to

I came across this post showing how to create a permissions management webPart using SPServices. I tried to do it in SP2010 but keep getting error " User not found". I think it has something to do ...
1
vote
1answer
584 views

SPServices Autocomplete and dynamic CAML query

I have two Text filter web parts (Project and Customer Name) with Apply Filters button for one list. There is a SPServices.SPAutocomplete on each and it works great. Now, I want to show the values in ...
0
votes
1answer
135 views

Calender and Date picker will overlap when i re-size my browser

I have the following components inside my App part ; a calendar and a date picker (i have moved the datePicket to be in the left side of the screen instead of being on the right side):- And I set ...
0
votes
1answer
341 views

Forcing showModalDialog() when an item is clicked from a web part links list

We have a web part on a page that refers to a simple list with two fields: Title and URl. Obviously, this list is used by the end user to show links to various items (google, etc) on the web part in ...
0
votes
4answers
3k views

How do I get the value of a SharePoint:FormField with javascript?

I have a form field: <SharePoint:FormField runat="server" id="ff2{$Pos}" ControlMode="New" FieldName="Number_x0020_1" ...
1
vote
0answers
115 views

Default.aspx (Reference Error: AddItem is not defined)

So I'm trying to push through learning how to code in the SharePoint environment. I created a script in a text file that i'm calling through a content editor webpart. When I debug the page using ...
0
votes
1answer
433 views

SP Online - Code blocks are not allowed in this file

I have built a selection of ASP.net controls on my default.aspx page. I am using the following line of javascript to try and get the value of an ASP control. var imgUrl = ...
0
votes
1answer
123 views

Sharepoint 2010 Javascript Client OM, get user data (not current user) via javascript object model

There are plenty of examples of getting the current user via javascript object model in SharePoint 2010, but I am looking for help with getting any users email/title when I have the loginName. There ...
0
votes
0answers
112 views

consuming WCF web service from client side in SharePoint 2010 Visual Web Part Sandbox Solution

I have a visual web part Sandbox solution. I need to attach an external WCF web service in order to submit data to database using the custom form I have created. Is there a way I can attach web ...
0
votes
1answer
594 views

SPO - /_vti_bin/lists.asmx returns Error 500

I am currently developing a news scroller/ticker in SharePoint Online (Office 365) and am using the follow script to access a list: var emptyResults = "<li>No current ...
1
vote
1answer
302 views

Can I add hide/show list to my Quick launch links

I have parent/child links hierarchy inside my Quick Launch links, but is there a way to be able to hide/show the child links, instead of always showing the child links? ::EDIT:: I have modified my ...
0
votes
1answer
643 views

Adding a cusotm title for javascript:SP.UI.ModalDialog.OpenPopUpPage

I have a code snippet inside my team site home page which contain the following code to display a pop-up dialog, as follow:- <li class="ms-comm-adminLinksListItem" unselectable="on"><a ...
0
votes
0answers
56 views

Intercept WikiPage Check In/Check Out Javascript Event

We're looking to customize the Status: Checked out and editable. SharePoint notification on our Wiki libraries. We'd like to change the message and include a button to the right that checks in the ...
0
votes
1answer
205 views

Write items from a SP list to html

I've very recently picked up SharePoint and have a limited knowledge of programming so you'll need to bear with me here. I'm currently building on a development site collection in SharePoint Online ...
0
votes
1answer
135 views

Specifying Title URL in List View Webpart

I want to set the Title Url something like /sites/somesite/SitePages/MySearchPage#Default={\"o\":[{\"d\":1,\"p\":\"AverageRating\"}]} where 'AverageRating' is one of my columns using which I am ...
0
votes
0answers
263 views

Resource interpreted as Image but transferred with MIME type text/css

When browsing my SharePoint 2013 Community site using goole chorme and using its developer tool , the consule is showing the following error:- Resource interpreted as Image but transferred with MIME ...
0
votes
1answer
416 views

How to utilize audience targeting with javascript?

Im creating a SharePoint-hosted app (restricted to use client side code only), and I want to retrieve documents from a library. Each document have a Target audience field. I want to, in javascript: ...
1
vote
1answer
179 views

clienttemplates.js is raising errors on Google chrome

when browsing SharePoint 2013 using google chrome i am getting the following error:- ReferenceError: Strings is not definedReferenceError: Strings is not defined And the Chrome Developer tools ...
0
votes
1answer
836 views

Unable to pass xslt variable in the javascript function

I have added an icon before the image title in asset library. I want to pass the name of the current logged in user and the image title in the JavaScript function to add it in other custom list. My ...
0
votes
0answers
111 views

Retrieving specific div from a wiki page on ajax call

I am trying to retrieve a specific div content through ajax call from a wiki page and then I need to use it in a web part page. The problem I am facing is that if I use this $.ajax({ ...
2
votes
1answer
208 views

Custom Action in user dropdown

Im trying to implement a custom action in the logged in user dropdown (when you click 'sp_admin' in the image below). The custom action should be a text called "Switch user", which when clicked ...
0
votes
0answers
206 views

javascript:OpenPopUpPage will close automatically on safari web browser

I have the following code to display a pop-up window:- <li class="ms-comm-adminLinksListItem" unselectable="on"> <a ...
0
votes
1answer
358 views

CAML Join for retrieving FieldLeafRef

I'va a custom list which contains a lookup field to a document library. Now I need to retrieve all items from this list with the corresponding file name from the document library with Javascript CSOM. ...
0
votes
1answer
456 views

How to decide which link is clicked from list item using javascript?

I have inserted an image (with <a> tag) like "Add to cart" before the title of list item using SP Designer. Now I want to check that which item's link is clicked using java script. How to do ...
0
votes
2answers
75 views

How to change the Ribbon.calender colour from green to blue

Blue is our official colour, and the higher management mentioned that all the colours should be blue. So for my Ribbon Calendar the upper boarder will be green as follow:- So is there a way to ...
0
votes
1answer
157 views

Sharepoint javascript:OpenPopUpPage Is not being displayed well on Safari and Chrome

I have added and code snippet to my team site home page to display a pop up when clicking on a link:- <li class="ms-comm-adminLinksListItem" unselectable="on"><a ...