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

Getting Version History and What Field has Changed

I am using the GetVersionCollection to get the history information from my list. This seems to be working fine; however, what I need to do is get the version history of the individual item which has ...
1
vote
0answers
504 views

Get Permissions with client object model

i want to add a permission on a folder who's inside a document library with javascript/jquery/client object model. The problem i have is, its a custom permission level created when some feature is ...
1
vote
2answers
1k views

Sharepoint Ribbon: Circumventing Context sensitivity

First of all, I've asked this same question on StackOverflow. I don't know if questions asked there are visited by users here and vice-versa, so in hopes that my question gets the most exposure, I'm ...
6
votes
1answer
1k views

JavaScript Client object model, rename folder

I am trying to rename a folder inside a Document library. Right now I get my item and everything is good but when I try to rename it using set_item('title', 'NewFolderName') it crashes and unwinds the ...
1
vote
1answer
629 views

Javascript, cannot complete this action

i am currently running some code on a sharepoint front end and am getting this error "Microsoft.SharePoint.SPException" "Cannot complete this action.\n\nPlease try again." So i looked into this and ...
2
votes
3answers
725 views

Can a web part prevent master page jQuery from executing properly?

I'm including jQuery and a custom .js file into the master page of my SharePoint 2010 site. In the $(document).ready() function, I'm setting a live event handler on an element in the header of the ...
1
vote
1answer
1k views

Use existing Modal Popup

I was wondering is there is a way to use the existing modal popup already used by SharePoint and override its callback? Thanks.
0
votes
1answer
265 views

Missing eMail in SPUser

I have a small application that is making use of the SP-COM. I use the following code to get the current users email address: ctx = SP.ClientContext.get_current(); web = ctx.get_site().get_rootWeb(); ...
3
votes
2answers
2k views

Page.ClientScript.RegisterClientScriptInclude in Sandbox?

I'm trying to use jQuery in a Sandboxed Visual WebPart (2010): protected void Page_Load(object sender, EventArgs e) { string jQuerySrc = Page.ClientScript.GetWebResourceUrl(this.GetType(), ...
0
votes
1answer
180 views

Enumerate Summary links column values in JS COM

I defined a list where a Summary list is a coloum, in my javascript code i want to read the values of the links one by one... sliderText = listItem.get_item('Description0'); sliderTitle = ...
0
votes
2answers
5k views

SharePoint 2010 - pull value from SharePoint list and pass through HTML link

I have a list with a column that contains a url. For exmaple: --LIST-- ID Name URL 1 MSN http://www.msn.com -- Now, what I need to do is pull the value in the ...
0
votes
1answer
143 views

Sharepoint Column Totals to User - Value defined by status

So I have two list databases. User Points User Submissions These two databases work together. A user 'submits' for points in a status of 'submitted'/UserPoints[PendingPoints:Column] once 'approved' ...
0
votes
1answer
2k views

Getting list length from caml query

I am currently trying to determine the length of a list that is located on my SharePoint site. I am using a Caml query to retrieve the items in my list, but I can not figure out how to get the length ...
0
votes
1answer
1k views

Tabs for DispForm and Edit Form SP 2010

There are tons of jquery tab solutions for page web parts. I can't find anything for custom list DispForm and EditForms for SP 2010? Essentially, I have a custom list with 94 custom fields. That's a ...
2
votes
1answer
208 views

Can I use javascript to determine if a list item has a related item or not?

I've got a List in Sharepoint 2010 and I've created a "related item" which has a link to my master list which is set to unique values (so for each item in my master list there is 0...1 child items). ...
0
votes
3answers
3k views

Register and run javascript on load in a sandboxed webpart

Got a placed called 'SiteAssets/test.js' with the function test(). I've created a nonvisual webpart, would like the script via the cs file and then run the function during the loading of the webpart. ...
0
votes
2answers
3k views

How can I retrieve list items from a subfolder using spservices?

I have a document library with subfolders containing images. I'd like to traverse the subfolders and grab the URLs of those images so that I can display them on my little js web app I'm whipping up. ...
1
vote
2answers
1k views

Microsoft Ajax Framework & SharePoint 2010 'Type' is undefined JavaScript error

Recently in SharePoint 2010 I've been seeing this stupid 'Type' is undefined error loading the Microsoft Ajax Framework. Now can anyone shed some light into what would cause this to start happening ...
3
votes
1answer
15k views

Calling the SP.UI.ModalDialog.showModalDialog method

My SharePoint solution has a userControl that Register a js block string getJS(string title, string htmlContent) { return (string.Format(@" ExecuteOrDelayUntilScriptLoaded(function ...
6
votes
2answers
4k views

moveTo and moving documents from one library to another

I have followed and successfully implemented the excellent article: SharePoint 2010 ECMAscript – Copy\Move files to another document library – Part 2 located at: ...
0
votes
4answers
533 views

How to know if JS file has been registered in a visual web part?

Let me explain the situation: I have a Sharepoint 2010 solution in VS that contains: Some Model classes A LINQ-to-SQL data context A WCF REST service 3 Visual web parts The web parts calls some ...
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
869 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
456 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
640 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
9k 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
5k 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
799 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
568 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
71 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
899 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
45 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
702 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
597 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
932 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
18k 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
839 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
345 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
463 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
410 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 ...