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
2k views

Reference a javascript script in a ribbon custom action xml

Reference a .js file on a spribbon custom action elements.xml on my javascriptmethods.js file: function test(){ alert('test message.');} on my custom action elements.xml: <CustomAction ...
1
vote
3answers
5k views

SharePoint 2010 get username for web application

I need to pass the current login user data from SharePoint 2010 to another web application. I am trying to use the javascript code to get the user and then pass it to the web application. I dont know ...
0
votes
2answers
1k views

Get web config setting value in javascript

Best way to get from a custom action js command an webconfig appsetting key value, or another similar approach. ideas? thanks. Reference a .js file on a custom action elements.xml on my ...
7
votes
1answer
20k views

the property or field has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested

The below question was based on this article: http://www.learningsharepoint.com/2011/09/10/get-all-folders-using-ecmascriptjavascript-client-object-model-sharepoint-2010/ I think the author there ...
0
votes
1answer
988 views

Hiding left hand navigation menu

I'm using the following code to hide the left hand navigation in SharePoint: <style type="text/css"> #s4-leftpanel { display:none !important; } .s4-ca{ margin-left:0px !important; } ...
5
votes
4answers
7k views

Get current web url in a SPRibbon Custom Action Command

I've a SPRibbon custom action with the purpose of open an custom app page in a modal dialog, but I'm getting troubles for getting the current web URL, as well, set a reference for a .js with the right ...
1
vote
1answer
357 views

populate dropdown in ribbon with folders from a specific site pages library only

I already have created a dropdownlist in the ribbon, however I need to fill it with the folders inside the Site pages library for example. I tried, but I didnt find any article or blog about it. ...
2
votes
1answer
485 views

How can I use SP.UI.Notify or jQuery to show real time messages in SharePoint?

I would like to use SP.UI.Notify or jQuery in SharePoint 2010 to display messages when a new document is added or a new item is posted. So if the users are on the page I just want the message to ...
1
vote
1answer
420 views

Why Aren't My ScriptControls Working in SharePoint?

I am a long-time ASP.NET developer but a first-time SharePoint developer. One of the most powerful features of ASP.NET custom scriptcontrols. Yet when I try to apply these controls to a custom ...
0
votes
1answer
2k views

How to show popup window in “-ing” event receiver?

I created event receiver that uses web service, and I want to show the result on popup window. I know we can use different kinds of redirect in synchronous receivers, but it is called by checkbox in ...
0
votes
1answer
301 views

How to I hide a SharePoint Document view based on certain variable in a Javascript code?

I have a SharePoint Document view that allow people to upload file. However, I have a Javascript variable that will control when can the people upload file. If the javascript variable is being ...
0
votes
1answer
191 views

Pull URL of newly created list item with JavaScript; SharePoint 2007

I have a user that wants the page to automatically go to the display page of an item that he just created. I want to be able to do this using a Content Editor Webpart using JavaScript that is placed ...
0
votes
2answers
497 views

Dynamic Population of Sharepoint fields

Can someone please help me with a query on Sharepoint? Suppose, I have a list called employee database and the list has two columns Name and employee ID. Employee ID Name 1 John 2 ...
1
vote
1answer
642 views

How to access AssignedTo in JavaScript Client Object Model

I have a task list that has a field AssigneTo which takes a user via the people picker. I can get the list item I need but I have no idea how I would access the oject being returned for the AssignedTo ...
5
votes
2answers
2k views

Sharepoint page redirection using JavaScript

below I have some JavaScript which listens for mouse activity and starts a timer if there is no activity and then redirects the user to another page after say 2 minutes..The problem is that if I have ...
3
votes
1answer
649 views

What are CUI.debug.js files and why are they needed?

Our server has had some issues lately and we've been keeping our eye on the processes running. One process taking up a lot of memory is using CUI.debug.js. I'm assuming it's used for debugging? What ...
2
votes
1answer
8k views

How can I pass a Parameter via Query String to populate a lookup field on a New Item Form/DVWP?

I have two lists: List A: Products List B: Requirements I'd like to have a nice Create Requirement page launched from the Product Listing page. I have a DVWP/Multi-Item View displaying all ...
2
votes
4answers
7k views

Hide ribbon for Visitors - Using Javascript

I need to hide the ribbon for all visitors. I have seen solutions that require editing of master pages. This requirement is for one site only. I do not want to make this change for all the sites ...
1
vote
3answers
887 views

Moving files using ecma script in ribbon custom action

I found this nice article about copying files from one location to another FIXED location. ...
0
votes
1answer
1k views

How to add SPUser to sharepoint list field (lookup)

I have a sharepoint list, with a lookupfield for users. The column name is "SystemUser". I have successfully added a listitem by using javascript, setting the "SystemUser" to the current user by ...
5
votes
3answers
12k views

Cannot get field value of list item through JavaScript

I try to get the value of a list item (that is currently selected). I know that I must load it into the context but even with loading the field explicitly I get the following message. Microsoft ...
10
votes
4answers
8k views

How to log off user from SharePoint site, if the user has been inactive for 20 minutes

How to log off the SharePoint site, if the user is has been inactive for for 20 minutes? Do I need to redirect user to logout page? How would I count the idle time?
7
votes
1answer
2k views

Create a Document Library Item base on a ContentType with JavaScript Object Model (JSOM)

I'm trying to create a new item in my Entreprise Wiki Pages Document Library. It's associated with a News Content type. I was able to retrieve the SP.List object (myList), the SP.ContentType object ...
0
votes
2answers
2k views

Handle the event generated by ddwrt:GenFireServerEvent('__name')

I have a custom DataFormWebPart that renders some content based on an XSLT. Inside the XSLT I have a button that does a postback like so: <input type="button" value="..." name="..." ...
0
votes
1answer
3k views

How can I display checkbox or radio button choices in a Choice field vertically?

I have a list with SharePoint 2007 with a Choice column that I'd like the choices to be displayed vertically (every 2 or 3) instead of horizontally. Is there some JavaScript/jQuery I can utilize to ...
3
votes
2answers
933 views

ScriptManager ServiceReference in SharePoint

I have always used jQuery.ajax to retrieve data from listdata.svc or lists.asmx in SharePoint and from some custom web services. Now I will try Microsoft Ajax Library and especially ServiceReference ...
2
votes
2answers
2k views

CustomAction : Put JavaScript code in a dedicated file

I have a custom action that look like this : <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id="MyCustomAction" Location="CommandUI.Ribbon"> ...
6
votes
4answers
11k views

Javascript to display sharepoint list items on page load

With Client Object Model API and a bit of javascript, I want to retrieve the items of a sharepoint list and display them into the web page, when the web page loads. I've successfully implemented ...
7
votes
1answer
3k views

Context Menus - Send To not working in IE9

I have a document center with a custom master page. The page is designed with IE9/HTML5/CSS3 in mind. In my other question, I worked out how to fix the IM Presence icons by fixing some core ...
12
votes
3answers
18k views

How to get all items in a View using Client Object Model (JavaScript)

To get all the items in a List you use // Setup context & load web context = new SP.ClientContext.get_current(); web = context.get_web(); context.load(web); // Load task list this.List = ...
3
votes
2answers
1k views

Stop deletes via EditForm.aspx using SP.UI.ModalDialog.showModalDialog going to List view page

If you use SP.UI.ModalDialog.showModalDialog to show a Lists standard EditForm.aspx the callback (dialogReturnCallback) is hit for cancels and edits but not deletes which are instead redirected to the ...
1
vote
0answers
275 views

Customizing richtextbox from formfield

This applies to SharePoint 2010. I have a requirement where users can only use a very specific set of "styles" when creating their content for SharePoint lists. As the "styles" ribbon button does not ...
4
votes
2answers
3k views

How to get the ID of the list item just inserted using SP.UI.ModalDialog.showModalDialog

If I am using JavaScript Client Object Model and SP.UI.ModalDialog.showModalDialog to display a form to enter a new list item, how can I get the ID of that item after its been added? Example ...
0
votes
2answers
2k views

Include javascript on application pages

I need to do some client-side alterations to some of the application pages, specifically the permission page (User.aspx). I need the javascript file to remove the "Administrate Parent Permissions" ...
1
vote
0answers
209 views

SPServices to retrieve the last record of repeated section data inside Sharepoint library

I have a Infopath that contain 2 fields which I put it as a repeating section as shown in the picture below (for the time being - please ignore the error) How do I retrieve the last record of a ...
2
votes
4answers
2k views

How can I Make a Dropdown box in a Form Field Conditionally Read-only/locked?

I have a drop down box form field (with values level1,level2) in SharePoint list. How can I lock the drop down box selection in the edit form.aspx whenever the condition is level2?
3
votes
4answers
7k views

Loading jQuery in the Correct order

I wish to use a jQuery plugin in SharePoint. Currentley I have jQuery added to each page via a custom master page. <script src="/Style Library/js/jquery-1.6.4.min.js" ...
2
votes
1answer
275 views

Set the Column Value when show the NewListForm.aspx using SP.UI.ModalDialog.showModalDialog()

i want to set the selected SPList Title value when show the NewListForm.aspx using SP.UI.ModalDialog.showModalDialog(), could anyone help me to resolve this issue please?
2
votes
5answers
8k views

How do we create dynamic url in Sharepoint 2010 Calculated field

I am working on creating sharepoint dashboard using color coding. I have my custom list created and all of the traffic lights are working based on condition user provides. Following is the basic set ...
3
votes
2answers
602 views

Using javascript linking between issue list and document library

I'm making a issue list that should have link to a document library. After registrered I want the dispform.aspx to show a link to the library with filter on the ID from the issue list. I know ID ...
4
votes
2answers
2k views

How to read a column type SPUser, DateTime, Currency with EcmaScript?

I have a list in SharePoint 2010 with some columns. All are default types. So I have "Single line of text" "Multiple line of text" "Date and Time" "Choice" "Number" "Currency" "Person or Group" ...
3
votes
1answer
479 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
637 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
473 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 ...
13
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
15k 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
236 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
322 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 ...