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)

3
votes
1answer
496 views

SharePoint List items, UserControls and cookies

I have another task at hand. I need to use cookies to read a title of an item from a custom list in SharePoint. This task is for SharePoint 2010. I have a container set up that will display the ...
4
votes
1answer
647 views

disabling javascript from overriding breadcrumb navigation styling

I've used some CSS to restyle the titlebar breadcrumbs in a SharePoint 2010 mysite. .s4-title h1 a, .s4-title h2 a, .s4-titlesep h2, .s4-title h2, .ms-ltviewselectormenuheader .ms-viewselector a { ...
2
votes
1answer
480 views

Sharepoint 2010 alternative to SetCtrlFromOpt

I have been tasked with debugging custom javascript which was originally written for 2007 by a 3rd party vendor. The 2007 site has upgraded to 2010 and the javascript has stopped working. The one ...
14
votes
1answer
3k views

Change Sharepoint language with a link?

Is there a way to get the language-switch control as static link in the pagelayout? I want my users to switch between German and English with a single click. Sorry guys, found a solution :D ...
13
votes
5answers
17k views

SP.UI.ModalDialog.showModalDialog using the html option

http://msdn.microsoft.com/en-us/library/ff410058.aspx says that you can use the option html to display html text in a modal. I have a string like this; var html = ...
3
votes
0answers
238 views

Alternative to hook into RTE javascript [closed]

I'm looking to add some logic when a HTML element (input, button, .. but no regular text) is clicked inside the RTE control on a publishing page. One of the solutions I've been thinking about is ...
6
votes
2answers
2k views

How to retrieve distinct values with JavaScript Client Object Model

How can you get distinct values from a SharePoint List column using JavaScript without a huge performance hit? A simple example would be appreciated :)
1
vote
2answers
8k views

How do get selected item of list?

I have a webpart .I add a listviewbyquary in createchildcontrols and a hyperlink in visualwebpart. i use this http://graegert.com/featured/using-the-editorpart-to-create-a-custom-listview-web-part ...
3
votes
1answer
329 views

Compressing or stop rendering of JS files from SharePoint on mobile devices

I have costumer who is complaining about massive data traffic on their mobile devices when they enter their website from their cellphones or tablets. When we made the site in the beginning, we made ...
7
votes
1answer
605 views

JavaScript Client Object Model functionality to get all the non hidden lists of current web and listing them

We have requirement to get all the non hidden lists of current web using JavaScript Client Object Model(JSOM). I have tried the below code but failed to get the desired result. function ...
2
votes
2answers
4k views

Scroll position in Sharepoint 2010?

Do you know a way to find out a scroll position in JS or jQuery on a page in Sharepoint 2010? I have a web part that is very big (high) so scroll on the page appears. But I cannot determine the scroll ...
6
votes
2answers
9k views

Get list by Internal Name using ECMAScript / JavaScript Object Model

How can I load items from a list using its InternalName? As far as I know I can get it using either Id or Title like the following: var clientContext = new SP.ClientContext('/News/'); var web = ...
4
votes
1answer
11k views

How to get all fields of a list using JS Client Object Model

Is it possible to retrieve all fields of a list (or default view) through the JavaScript Client Object Model and filter the fields on type (e.g. I only want the Choice fields). var clientContext ...
0
votes
1answer
1k views

SP.UI.ModalDialog.showModalDialog not working with IE7

I'm trying to make this link below work with IE7 but it doesn't fire. Whereas is ok in IE9 and firefox. Any ideas what i'm doing wrong :( THanks <a href="#" ...
2
votes
1answer
3k views

JavaScript object model - using executeQueryAsync with body.onbeforeunload

I am trying to write some code that updates a list item when a list edit form (EditForm.aspx) opens and closes. I have written a function and assigned it to the onload and onbeforeunload events of ...
3
votes
3answers
6k views

Expanding and collapsing sharepoint webparts

I want to implement a collapsing/expanding feature to all my webparts in a certain page and tried the code shown here: http://moblog.bradleyit.com/2009/08/sharepoint-expand-or-collapse-web-parts.html ...
0
votes
1answer
991 views

Javascript in Content Editor will not run unless our URL is a trusted site

We have a client that have their systems set up so that the Javascript in a Content Editor on a page does not seem to run unless they add the url of the site to the list of Trusted Sites in Internet ...
4
votes
8answers
18k views

How can we get Cascading Lookup Columns in sharepoint 2010?

How to get the cascaded Lookup columns in sharepoint 2010,Iam having requirement like i have two lists(Category List and Sub category list)..For each item in category list i have 5 different items ...
1
vote
1answer
1k views

Anyone know how to upload files into a Sharepoint Library using javascript and the SOAP API in SP 2010?

I am writing custom forms in javascript. I do not have access to visual studio. I need to be able to upload a file into a document library with meta data. I've been playing around with the Copy.asmx ...
0
votes
2answers
818 views

Is there any way to access a managed meta data service using only javascript in SharePoint 2010?

I am creating custom forms in a SharePoint site. The only thing is most of our Lists contain managed metadata fields. I have been successful in adding new items to Lists having only standard fields ...
3
votes
2answers
7k views

Expand/collapse all grouped items in views of a page

Is there a way to add a button to a SharePoint 2010 page to expand all grouped items in all the list views on the page? This is the first (top) level grouping only, not the second level. These are ...
2
votes
1answer
2k views

SharePoint Ribbon Loading endlessly

i'm a beginner of SharePoint.I'm using 2010version. Here i'm facing a problem that the ribbon of my root site is loading endlessly. I could not use the options like page, Edit,site action etc.. but ...
1
vote
2answers
6k views

Check list item title in SharePoint 2010 using ECMA script

I have a requirement that I need to check the list item title in SharePoint 2010 using ECMA script. For that I am using: this.oList = web.get_lists().getByTitle('UserThemes'); ...
1
vote
3answers
274 views

Is this the best way to open a dialog for a custom page?

I did some looking around and I was planning on creating the following js function to open a custom page in a dialog: //Handle the DialogCallback callback function ...
8
votes
6answers
29k views

Get Site Collection full URL using javascript

I want to get the URL for my site collection. One way I thought I could do it was using the window.location in javascript and getting it that way. I know that you can use ECMA script and the client ...
1
vote
1answer
1k views

How to check if current folder in document library has child items via JavaScript client object model?

I have a custom button on ribbon, which performs some action with current folder (download folder content as zip package). I want to disable this button in case if current folder doesn't contain any ...
5
votes
3answers
4k views

Javascript to get GUID from SharePoint

I am newbie to SharePoint and I am uploading a file to the server using javascript. Now the task is to get the GUID of that file and display it ({alert(guid); is fine). I don't even know where to ...
3
votes
2answers
885 views

SharePoint 2010 Save ListItem without closing

Is it possible to save a ListItem without closing the modal dialog in SharePoint 2010? Possibly by replacing the save button on the Ribbon with a custom button that calls the submit function and keeps ...
5
votes
3answers
5k views

How to get SP.Folder for SP.ListItem in SharePoint 2010 JavaScript Client Object Model?

I have a custom button on ribbon for document library and need to disable it if current SPListItem is an empty folder. To disable button I use EnabledScript attribute of CommandUIHandler. I can get ...
7
votes
2answers
2k views

How do you stop scroll position maintained after postback on lists?

I have a list with paging enabled and a page size of 10. When you scroll to the bottom of the page hit the next button in the list the page redirects to itself with different querystring parameters ...
2
votes
2answers
452 views

Branding SharePoint 2010 CSS and Javascript - Training Courses?

I've been tasked with branding our new corporate website which will be on the SharePoint 2010 platform. Is anyone aware of some good training courses in the UK that might be able to help on the CSS ...
3
votes
3answers
4k views

Sharepoint - Calculated Column showing different colours based on list item age

Marc, I understand you are a busy man, but if you can spare atleast sometime to my query below then I will really appreciate the gesture. Background: We get several requests (items on SharePoint ...
3
votes
2answers
2k views

Programmatically add Event to Sharepoint Calendar using Client OM

I need to programmatically add events to a SharePoint Calendar and make them repeatable using JavaScript Client Object Model (without any c# code). Does anybody have ideas how can I implement this ...
1
vote
0answers
523 views

get current Page Layout in sharepoint 2010 using ECMA script

I have a requirement that I need to create a custom page layout and need to update the current page layout with my custom page layout. In SharePoint we have a feature to change the page layout. But I ...
6
votes
1answer
1k views

Get and remove all currently displayed notifications from SP.UI.Notify

I am sending a variety of notifications via SP.UI.Notify.addNotification("blah", true); setting the "sticky bit" to true so that the notification stays visible. When I display a second ...
3
votes
3answers
4k views

Set SP.UI.Status or SP.UI.Notify at PostBack

I use in my web part a Session[""] and would like to notify the user when the session is expired. I check at the PostBack event if the session is already okay, if not, I will execute a JS function ...
1
vote
2answers
2k views

Displaying the item version history programmatically using Javascript

I have a SharePoint 2007 list that have version history enabled. I am interested to know how do I view the version history of a item using Javascript (or JQuery).
4
votes
2answers
825 views

How to change webpart custom property in sharepoint 2010 using javascript?

I want to change Custom Property of Webpart using javascript. Does anyone have any ideas on how to accomplish this?
3
votes
1answer
2k views

REST API + Expand Recurring Calendar Events?

Is there a way using the REST API (through javascript) to expand recurring calendar items? Or is there a helpful client side utility to assist with this?
1
vote
3answers
3k views

__redirect not working after __commit on Form Action Button

This is in Sharepoint 2007 -- Designer I have written a Form Action button and it has the following Code: <input type="button" value="Add List Item" name="BtnSave" onlick="javascript: ...
0
votes
3answers
562 views

SharePoint redirect to add parameter

I want to add a parameter "Force=True" when the user is redirected to userdisp.aspx (when you click on people's name) What is the best way to do it? Details: I need that because I do not have a ...
1
vote
2answers
158 views

Tooltips on check boxes

I have a CheckBoxList , I want to assign tooltip to all the checkboxes. How is it possible? I cannot find any property associated with this. <asp:CheckBoxList ID="XYZ" RepeatColumns="3" ...
9
votes
1answer
590 views

Detecting browser and replacing web part?

I have a video I want to display on my SharePoint 2010 public facing site and at the moment I am using Silverlight, however, I would like to replace this with flash (youtube actually) if the users are ...
3
votes
2answers
4k views

SPservices to retrieve version history of items in SharePoint List 2007?

May I know how can one use SPServices to retrieve all the version history of a particular items in a SharePoint 2007 Server List? (If it is not possible via SPServices, are there other Javascript ...
1
vote
1answer
93 views

Can someone explain the ULS18u function that appears in the main pages of some site collections?

This function is then used throughout the page for various reasons. Usually it appears as the first line in other java-script functions. As an example: function toggleBlockOn(elementID) { ...
2
votes
1answer
413 views

Access My Content using ecmascript client OM

Is is possible to access the current user's "My site" and "My Content" using the ecmascript client OM? Specifically I'm looking to create a custom list, that is specific to each user, and wanted to ...
3
votes
1answer
2k views

Getting date and time from SharePoint Server 2007 and throw it to Javascript variable

How to I get the date and time from SharePoint Server 2007 and pass this value as a Javascript variable?
5
votes
4answers
12k views

Closing a modal dialog using a custom form

I am using some JavaScript (Client OM) code to open a dialog. Here's a snippet: function OpenModalForm() { //snip var opt = { url: url, width: 800, height: 600, ...
4
votes
3answers
7k views

Sharepoint 2010. 'xsd is not defined' Error when trying to save edited list item or create new! IE9

In internet explorer 9 i have error when trying to save list item. Namespace prefix 'xsd' is not defined. Before that i have javascript error inside some sharepoint files. This error says really ...
8
votes
1answer
5k views

How to get a list of all Choice field options using Client Object Model

How would you get a list of all the possible choices from a choice field (e.g. Task list Priority or Status fields) using javascript client object model?