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

Multiple SharePoint 2010 modal-dialogs

Is it possible to show multiple modal-dialogs above each other? It should work like this: 1) User clicks link that opens first modal dialog 2) in first modal dialog, user clicks another link that ...
0
votes
3answers
2k views

Override Top Navigation Hover Effect

I would like to add some JQUERY effects to my top nav when a user hover overs the top link..specifically a delay and slideDown with easing effect. Is there a way to simply override the existing code? ...
0
votes
4answers
847 views

Fetch SPList items from another siteCollection - problem with xml

Trying to fetch all list items from a list located in a different site collection and traverse the list items, reading some of their column values. I've taken some code from an example snippet that ...
2
votes
1answer
440 views

How do I trigger off of the ribbonbar being shown/hidden?

When the ribbon bar is visible (i.e., not in Browse mode), I want certain things to happen on my page (mostly involving changing styles of some items). How do I determine if it's visible or not or ...
0
votes
1answer
3k views

Want to set a List's FormField value via Javascript, but how do I identify the textbox?

I've got a List in SP2010 and am trying to update a value with a little javascript and I'm not sure what I ought to be doing. I've set the default List Form WebPart to false, and added a custom list ...
2
votes
3answers
5k views

SP.UI.ModalDialog does not close

I have custom field. This field contains video. In Render method I open modal dialog (SP.UI.ModalDialog), and inside of this dialog I display a video (with WebControls:MediaWebPart). The modal is ...
1
vote
2answers
624 views

Javascript disappearing in sharepoint 2007 when using rich text editor

This may be an easy one. When I add javascript code and HTML to a Sharepoint 2007 content webpart, if I then go in and edit the page using the rich text editor and save, the javascript disappears. ...
1
vote
2answers
1k views

Is <QueryOptions> valid in SP.CamlQuery for meeting work space

I'm trying to query all items in a meeting workspace list. I'm trying a query I think should work, but still only returns items specific to the instanceID. Is there a different flavor for client side ...
1
vote
2answers
5k views

What arguments can I pass to NewForm.aspx using SP.UI.ModalDialog.showModalDialog(options)?

I'd like to create a task with a pre-filled title, as well as set some other properties. I found this documentation that says I can pass arguments when i call ...
3
votes
3answers
8k views

Get User via JavaScript Client Object Model

Is there a way to get user information via the JavaScript Client OM? Something similar to the clientContext.Web.EnsureUser(userName) method. I am aware that there is the SPService JQuery library, but ...
0
votes
1answer
4k views

Error Running ExecuteOrDelayUntilScriptLoaded

Using IE9 (9.0.8112.16421) I receive the following error in the debugger while running the script I'm working on: "Unable to get value of the property 'toLowerCase': object is null or undefined" ...
0
votes
4answers
2k views

JQuery in a Visual WebPart won't load on the page with the webpart

Hey I have a bunch of JavaScript/Jquery code that works really well when I use a Content-Editor webpart, but does not execute when I add the same code to the VisualWebPart mark up. I am referencing ...
1
vote
1answer
773 views

Opening a webpart from a separate page in modal form

I am an IT schoolboy who is on an 8 month apprenticeship. I have been charged with creating a little sharepoint site for our tiny group in the company I am working at. I have site collection (is that ...
1
vote
3answers
536 views

Is there a way to have the tool part pane open where the WebPart zone is located?

If you're dealing with a page with many many vertical WebPartZones & WebParts, is there any way to have the ToolPart Pane open next to the WebPart you are editing? Or move up as you scroll up and ...
1
vote
1answer
70 views

Javascript: How can I tell if the page is being customized (and not personalized)?

How do I know if the page is in Edit Mode from JavaScript? tells me how to know if a page is in Design mode. I need to distinguish between the two design modes: customizing vs personalizing. How can ...
2
votes
3answers
875 views

Expected ; on javascript

I got the following code in my elements.xml, but I cant find the error. My ribbon is broken, the error says, expected;. But I see no error, yet, maybe fresh eyes can see it. See the EnabledScript ...
1
vote
0answers
44 views

How do I get count of list item collection items with javascript? [duplicate]

Possible Duplicate: Getting a count of list items in a list via ECMAScript I found something, it works, but it's not nice. var items; ... var enumerator = items.getEnumerator(); var count = ...
1
vote
1answer
684 views

Disable ribbon button if one folder is selected

This script works but only for one selected item EnabledScript="javascript: var items = SP.ListOperation.Selection.getSelectedItems(); (items.length == 1 ...
0
votes
2answers
582 views

Is it possible for ECMAScript to manipulate a library?

I'm trying to write a script using the Client Object Model that searches for information from a document library, but I'm having no luck. However, using the same script with a couple of variables ...
0
votes
1answer
3k views

Retrieving and displaying custom list column names (which have spaces in them)

I have been to Jan Tiernans blog, and figured out how to grab column names using Soap and jquery/jscript. I can't figure out how to grab custom columns with special chars though. I have read about ...
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
855 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
17k 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
763 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
342 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
447 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
408 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
1k 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
268 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
181 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
457 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
526 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
1k 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
568 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
7k 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
6k 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
854 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
10k 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
7k 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
850 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
10k 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 ...
6
votes
1answer
2k 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 ...
9
votes
3answers
14k 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 = ...