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)

2
votes
2answers
3k views

Error on sp.js property 'isNullOrUndefined'?

When I try to run my javascript SP.JS file in a user control I get this error: Microsoft JScript runtime error: Unable to get value of the property 'isNullOrUndefined': object is null or undefined ...
0
votes
1answer
499 views

SharePoint CEWP Javascript works on IE8, but not Chrome or Firefox

I have some Javascript in a CEWP on a custom item display form that works fine with IE8, but not with Chrome or Firefox. The script is to hide select menu items from the display menu (mostly ...
1
vote
4answers
624 views

itemAdded event handler or javascript when a file size greater than 1MB

Easiest way to implement the 1mb limitation on file upload. Do I use event handler to take care of this or javascript? I can have the event handler ready as I have messed with it before. It is better ...
1
vote
1answer
200 views

Guidelines for rich UI?

Edit : actually, my current task is focused on the refactor of a webpart, but the question is in fact a general question : what are guidelines for "cool" SP UI. /Edit I have to maintain a set of ...
0
votes
1answer
441 views

Is there a way to get the currently logged user’s colleague list using ECMA client script?

Is there a way to get the currently logged user’s colleague list using ECMA client script? Used the below script to pull the currently logged user name: <script ...
4
votes
1answer
2k views

JavaScript error using date picker inside an update panel?

I placed the SharePoint date picker control inside an update panel and when I click on the calendar it gives me this error: Microsoft JScript runtime error: The value of the property ...
1
vote
1answer
657 views

Where can I find the permission details for the HasRights javascript call in core.js?

I am writing JavaScript that will show a menu item for the document ECB menu in a SharePoint document library. I want to only show the item if the current user has the ability to edit the item. It ...
2
votes
2answers
604 views

What do you do to enable Auto-Versioning of custom CSS and Javascript in SharePoint 2010?

I want to be able to auto-version these in SharePoint and I'm looking for the best solution. SharePoint does it with some of it's files. For example: <link rel="stylesheet" type="text/css" ...
1
vote
1answer
508 views

Add Image to WebControl.RichImageField client-side Sharepoint 2007

Situation: I've got a pagelayout with 3 LanguagePanels with in everyone a RichImageField. Above these languagepanels, i've got a "General info" panel with a textbox for an url. In edit mode, if I want ...
1
vote
3answers
5k views

Auto populating columns within a list?

First time user & poster here. A friend recommended me to this site for a question I have in relation to populating columns within a list. Hopefully I can explain it properly and someone could ...
1
vote
3answers
2k views

Adding item to list view context menu

SharePoint 2010 question here. I have a document library with a number of documents, and I want to add an entry to the list item context menu (the dropdown menu that contains the "View ...
3
votes
5answers
2k views

Why am I unable to save JavaScript in a Content Editor Web Part?

I am trying to follow this link and put all the code in a CEWP as suggested. After saving the page the code goes away (except for the gear part, top line). I could really use some help if possible.
3
votes
2answers
375 views

Can all the /_layouts/xxx.debug.js files not be served to end users?

I'm working with a 3rd party vendor who has done the SP 2010 integration of a small site. I've noticed that our incredibly simple login page is nearly 3.2 megabytes. The users of this site are the ...
1
vote
1answer
372 views

adding where clause in javascript

var PicLibraryURL = "/SC/SW/_vti_bin/owssvr.dll?Cmd=Display&XMLDATA=TRUE&List=%7B9D30BD4A%2DBA0F%4ED2VM%2DBEBB%2D8CEC5D74A29B%7D"; How do I add a where clause to above javascript? I have a ...
9
votes
8answers
10k views

How do I determine a user's SharePoint group membership using the client object model?

I want to redirect users from a landing page to another page in SharePoint 2010, based on their group membership. I need to do this using JavaScript (ECMAScript) and not server side code.
4
votes
2answers
2k views

Sharepoint 2010 ModalDialog title

I am creating a popup window in sharepoint using this code in javascript. function openDialog(title, url, width, height, CallResult) { var options = { url: getUrl(url), title: title, ...
3
votes
2answers
916 views

Sharepoint 2010 MdalDialog title [duplicate]

Possible Duplicate: Sharepoint 2010 ModalDialog title Hi, I am creating a popup window in sharepoint using this code in javascript. function openAutoResizableDialog(title, url, ...
5
votes
5answers
2k views

Include JavaScript in a feature

I remember seeing somewhere that you can include an external JavaScript file in a SharePoint feature if it is in the _layouts folder. For the life of me I can't remember how to do this!
4
votes
3answers
2k views

How do you allow Content Authors to add Javascript to a Publishing Page?

We have an internet-facing, SharePoint 2010, Publishing Site. The content authors that maintain the site are JavaScript savvy web designers. They would like to be able to add JavaScript to publishing ...
2
votes
3answers
5k views

Automatically fill in metadata on new document created from template

I have a custom button on my application page to open a new document from a document template, like you would do directly on a list. The code is similar to: <a href="http://Site/test/documents" ...
34
votes
10answers
17k views

How do I know if the page is in Edit Mode from JavaScript?

Is there a way to find out if a page is in Edit Mode from JavaScript? I know in on the server-side can be found using SPContext.Current.FormContext.FormMode but I can't find any means of doing it ...
1
vote
3answers
4k views

Problem with IFrames and SharePoint 2010

When having an IFrame inside SharePoint 2010, scrollbars disappears under some cirumstances depending on window size and mouse position. If holding the mouse over the address bar while refreshing the ...
2
votes
3answers
985 views

Where do you deploy scripts that are loaded in a masterpage?

Do you deploy the script files to "_layouts" or the content database? If "_layouts," do you use a <ScriptLink> tag or a <script> tag?
1
vote
1answer
378 views

Restrict additional pagehead in sharepoint popup window

hi i have added additionalpagehead in sharepoint which will run a javascript functions to show some texts. It is working fine in all the sharepoint pages but it is working in sharepoint popup window ...
0
votes
1answer
397 views

Use of owsbrows.js , core.js in sharepoint 2010 [closed]

I would like to know how "viewproperties" menu works an item in a list.I googled for sometime and found that the jscript files "owsbrows.js" and "core.js" at C:\Program Files\Common Files\Microsoft ...
0
votes
2answers
1k views

debug javascript [closed]

I have a javascript thats breaking. Now Is there a way i can call the function from content editor web part and debug to see where the hick up is?
1
vote
1answer
374 views

Sharepoint 2010 only displaying an item in the ribbon if using IE

I am using some JavaScript that can only be used in IE. Is there a way to hide my custom ribbon button if not in IE? Or only display it if it is IE.
3
votes
1answer
184 views

Getting the path of a an item on using UrlAction and JavaScript

I have a custom ECB menu item. I want to get the path of the file that has been right clicked and alert it using JavaScript. Is this possible?
2
votes
1answer
1k views

sharepoint webpart javascript - 'null' is null or not an object

I have an issue on one of my sharepoint enviriontments regarding some kind of javascript problem with the Content Editor Web Part which keeps returning me these errors when I try to user the RTF-text ...
10
votes
3answers
3k views

Site Assets vs. Style Library

I usually store my JavaScript/jQuery files in the Site Assets library, but I see on forums that others are using the Style Library. What are the respective benefits of each?
9
votes
4answers
1k views

Why does having `windows.onload` break page editing?

This is related to an earlier question that I posted: Can't edit page after adding custom web part! Basically, I have created a web part with some javascript. When I add this web part to a ...
1
vote
4answers
4k views

Why are my sub site collections not getting javascript and css files?

I have a master page deployed with a feature which has custom javascript and css references on it. I am using the <Sharepoint:ScriptLink> and <Sharepoint:CssLink> tags and the code is ...
1
vote
2answers
874 views

get all image library lists via listdata.svc or web service, how?

I want to retrive all image/picture lists a site has with javascript. Can that be done via listdata.svc or via a soap webs service? When looking at the response from listdata.svc i can't see what ...
0
votes
2answers
653 views

Possible to use an ASP.NET control value in a Javascript file used in a Web Part?

When you are coding in an aspx page you can do something like this: <html> <head> <script type="text/javascript"> $(document).ready(function () { var chkEnable = ...
38
votes
6answers
32k views

How do you get the current list item in JavaScript?

There's all kinds of ECMAScript class library examples around but all of the ones I find show how to retrieve all list items (through SP.ClientContent) but how do you get the current list item? I'm ...
1
vote
2answers
6k views

How to add a pop up aspx page to your web part?

I'd like to have a pop up that contains an aspx page. It appears that adding an aspx page to a web part is not possible. When I went to add a new item to the project the closest I could find were ...
7
votes
2answers
8k views

Adding ScriptLink for js file to my Visual Webpart causes error: “Cannot make a cache safe URL for…”

Full error: Cannot make a cache safe URL for "sprocketcomplete/layouts/sprocketcomplete/js/sprocketcomplete.js", file not found. Please verify that the file exists under the layouts ...
1
vote
1answer
876 views

Problem adding javascript/jquery to my WebPart

My ascx looks like this: <SharePoint:ScriptLink ID="ScriptLink1" runat="server" Name="/_layouts/1033/MyProject/js/test.js"/> test: <input id="example" /> test.js looks like this: ...
1
vote
2answers
859 views

Inject dynamic javascript using MasterPage

We have to inject dynamic javascript (contains a encrypted var value) into all web pages. What is the best way to inject Dynamic Javascript using Master Page? Other Details: SharePoint 2010 STD ...
1
vote
1answer
635 views

How do I use a javascript variable in the Filter Criteria for a DVWP?

I am converting some numbers using Javascript and need to filter a list using these conversions. I cannot do the conversions within SharePoint itself, so I had to use Designer and some Javascript. I ...
1
vote
2answers
334 views

Social rating from grid view

HI ALL ! i want to provide rating of items of a sharepoint 2010 list from a grid view hat is showing all the list items in a grid with branding . is there any way to add a rating column in a grid ...
0
votes
1answer
94 views

How to Navigate between Multiple Controls within a web part in sharepoint 2010 by using javascript

Please tell me how to Navigate between Multiple Controls within a web part in sharepoint 2007, by using javascript.
1
vote
4answers
173 views

where can i write javascript in sharepoint

Please tell me where can I write javascript for a sharepoint site and what are the possible ways to write a javascript code for a sharepoint site.
0
votes
1answer
128 views

How can I call controls on a 'multiple control webpart' dynamically by using JavaScript

Could anyone please tell me how to call controls on a 'multiple control webpart' dynamically by using JavaScript in sharepoint
0
votes
1answer
2k views

fix the position of a webpart

hey all ... i have a query i.e. How can i fix the position of the webpart on a page? in user personalization scope fixed position means fixed zone & fixed index (top / buttom). & user can ...
0
votes
1answer
436 views

JavaScript code block messing with drop-downs in Menu

I am using SharePoint 2010 and I need to place the following JavaScript code on a page to give me time in Rome <SCRIPT LANGUAGE="JavaScript"> function GetTime() { var dt = new Date(); ...
0
votes
3answers
3k views

How do I run some JavaScript in a web part?

I found some JavaScript code on the web that I want to add to my custom web part so that I can modify a PageViewerWebPart's height to 100%. I just need to know what steps to take to call it. I added ...
4
votes
1answer
2k views

how to get users from SharePoint user profile db using jquery

I just want to know, is there any way to get a SharePoint user using javascript / jquery from default SharePoint 2010 user profile db? My requirement is to form an array of all SharePoint site users ...
0
votes
2answers
1k views

Autocomplete people picker in sharepoint2010

I have a problem in which I have to add an Auto Complete functionality for a new people picker of Sharepoint list newform.aspx While Googling I found this ...
7
votes
3answers
1k views

Replace semicolon delimiter in a Lookup column on the list view

When selecting multiple values, the data is separated with semicolons. When many values are selected it starts looking cluttered. Is there any way to have each value on a new line? For example, ...