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
83 views

Is it possible to use the Javasciprt client object model from a different web server?

Basically I would like to host an application on a different server than my SharePoint server. Using the managed client object model I have been able to access data on my SharePoint server, but I'm ...
0
votes
1answer
155 views

Access different site collection using client OM

I have written a little app, which makes use of the ECMA client OM. I need to access from a site-collection "/sites/subsite" a list, which is located on the site-collection "/". However, this shows a ...
5
votes
1answer
516 views

structure of sharepoint javascript functions

I am trying to understand more the structure of javascript functions in SharePoint. Why does every function begin with som value than colon and semicolon like ULSrE8:; in spgridview.debug.js: ...
1
vote
1answer
576 views

Problem with expanding/collaping gridview rows in Firefox

I have an asp:Gridview control called gvComments that uses the following Javascript to show/hide table rows. If the expand/collapse button is clicked, a string (EventID) is passed to the function and ...
0
votes
3answers
5k views

Get the user id via javascript

How can you get the current users id using javascript? Can you do this any JS file or does it need to be added at a certain point?
0
votes
1answer
536 views

Building a Floating Menu for SP 2010

I would like to have a floating menu the menu can come from a list or use the Quick launch. Any ideas or samples out there.. For example if i can make this float ...
3
votes
2answers
1k views

Web Service UpdateListItems User Permissions

I'm trying to do an AJAX SOAP call to the Lists web service, specifically UpdateListItems. The query isn't malformed, and is working appropriately when using a user with full permissions. When a ...
4
votes
1answer
523 views

In SharePoint 2010 how can I add user selected WebParts at run time?

I am quite new to SharePoint and have been given an interesting problem to solve. My users have requested to each have a custom home page that they can customise with ease. The design I have been ...
1
vote
4answers
171 views

Showing url images in webpart

I need to display the images of the url typed in a custom webpart . i.e if i type url name (www.google.com) , atomatically it should display the small logo of google in webpart .Anyone with this idea ...
4
votes
2answers
3k views

Trying to redirect after closing Modaldialog, but parameters aren't set

I have a layouts page which creates a new site. I use SP.UI.ModalDialog to show the site. I've created the following js function I use to pop it up: function PagePopupAndRedir(fileUrl, fileTitle, ...
4
votes
2answers
840 views

Custom Delete Page Button

I'm trying to create a custom delete page button for my users on a publishing site that resides on the actual page. At first I thought it would be as simple as just copying the code behind the 'Delete ...
0
votes
1answer
143 views

Issue with editing SharePoint Page

I have an issue with editing a Sharepoint page. I have to check whether Silverlight is installed in the user's system which is done by a Javascript function, but the issue I'm getting after ...
0
votes
1answer
764 views

Put Easy-Tabs in page layout rather than CEWP

Another question about the fantastic Christophe Humbert Easy Tabs library: Can the library be included in a page layout for a publishing site rather than in a content editor web part? This way it's ...
0
votes
1answer
575 views

Add a JS file as embedded resource in a web part in VS2010

I am trying to add resources JS files, images, CSS files as embedded resources to my custom web part, I am writing in VS2010. I have set the properties of these files as "Embedded Resources", but I am ...
2
votes
2answers
229 views

SharePoint 2010: blocking the screen on load

We are hosting some SP2010 sites and some of our users are a little quick on the trigger and try to click on an order before the page is done loading, inadvertantly approving it by mistake. Repeated ...
1
vote
2answers
3k views

PreSaveAction is not firing

Any idea why the PreSaveAction is not firing. I am trying to take the user to a thankyou page when they complete a survey. I added this js thru SP Designer to NewForm.aspx. <script ...
12
votes
2answers
11k views

Programmatically add JS/CSS to pages

I've created a Visual Studio SharePoint 2010 solution with an ASCX that adds some JavaScript files and CSS to the head of each page; this is based on this article. When I deploy the solution, it adds ...
0
votes
2answers
560 views

Link in master page to base url

In a WebApp with diffrent site collections and subsites, I would like to add a link on the custom master page of all sites to the WebApp Url. (This Url is corresponding with a home/top site ...
7
votes
1answer
6k views

Get a value included from a lookup column using the JavaScript Client Object Model

Related: How to retrieve a ListItem using the Javascript Client Object Model? In my previous question I was able to successfully retrieve a basic value from a list item. My problem is that I am now ...
5
votes
5answers
820 views

How can I include jQuery and JavaScript code without straying from the site template?

I've added my JavaScript code by including the script links in the PlaceHolderAdditionalPageHead <asp:Content> tag. Including this has caused a yellow warning stating The current page has ...
3
votes
1answer
3k views

How to import external javascript in a User Control?

I have a code-behind User Control (myUserControl.ascx and myUserControl.ascx.cs) that are in ControlTemplates/MyFolder/ and, in the code of myUserControl.ascx I need to use some javascript ...
2
votes
1answer
9k views

How to retrieve a ListItem using the Javascript Client Object Model?

Right now I am using this method: function getWebProperties(id) { var ctx = new SP.ClientContext.get_current(); this.website = ctx.get_web(); this.listCollection = website.get_lists(); ...
0
votes
1answer
119 views

Proper way to retrieve list data asynchronously?

I have done this in the past using jQuery's ajax function and the SharePoint web services, but I'm curious if it is considered a better practice to use the Javascript Object Model? Also, is it secure ...
2
votes
3answers
101 views

Best Practice: Javascript Registration SP2007

There is always the ASP.net way of registering javascript on the page using the Page.ClientScript.RegisterClientScript() method, but I was wondering if there was a better way to register your ...
1
vote
1answer
544 views

Select item from popup window and return the url to the parent window

I'm having a tricky problem which I can't solve with the AssetUrlSelector since it won't pass parameters. This code works except for the parameter: <xsl:variable name="CurrentProductCode" ...
1
vote
1answer
346 views

How do you handle Javascript/CSS packaging/minification/auto-versioning in SharePoint?

Packaging: Taking file1.js and file2.js and combined them together to make file3.js Minification: Using things like JsMin or YUICompressor Auto-Versioning: URL has /scripts/file2.js?v=123456
7
votes
7answers
6k views

What is the proper way to add jQuery to a MasterPage?

Currently I am using this method in the header: <script src="/_layouts/MNCAssets/scripts/jquery-1.5.1.min.js"></script> But for some reason, my webparts that use jQuery don't appear to ...
0
votes
0answers
70 views

Is the javascript in my webpart executing before the javascript in my MasterPage? [duplicate]

Possible Duplicate: What is the proper way to add jQuery to a MasterPage? I have a few webparts that use jQuery. Instead of adding the jQuery in each web part I decided to add it in the ...
2
votes
2answers
5k views

How do I get the number of items in a list?

I have a list with a lot of items in it I need to know the list item count the following is my code: var sListId = SP.ListOperation.Selection.getSelectedList(); var oWeb = ...
1
vote
2answers
700 views

javascript open parent window from NewForm.aspx

I have the following javascript in the NewForm.aspx. It works but opens the link in the NewForm.apsx. I need to open the link in the parent window where NewForm.aspx was initiated from. What am I ...
2
votes
3answers
6k views

What's the best slideshow viewer for SharePoint 2010? [closed]

After working with the Picture Library Slideshow Web Part for a while, I'm unhappy with it's display. On a blank wiki page, it looks fine, but when you start adding other web parts on the page, it ...
3
votes
3answers
8k views

How to get list by url using client object model?

Is it possible to get list by url using ECMA script client model? For example something like this: context.get_web().get_lists().getByUrl("Lists/MyList"); UPD!: Please, refer to this correct ...
3
votes
2answers
5k views

Path to jQuery file for SharePointWebControls:ScriptLink

I'm working in SharePoint 2010 Designer to create a custom page layout. I've added a SharePointWebControls:ScriptLink control but am not sure what the path is to my jQuery library. It's uploaded to ...
2
votes
1answer
1k views

Custom form validation

I am new to Infopath and Sharepoint, and have been reading everything I could find online about this, but nothing to solve my problem. We need a form with custom validation (logic in javascript) to ...
1
vote
1answer
3k views

Script Manager in SharePoint pages

I am working on some mobile web parts and have got into a problem. My issue is that I have a custom web part which is a mobile web part. I have got everything working and I can see the web part in ...
2
votes
1answer
813 views

SPListItem removing HTML attributes?

I want to add this to an SPListItem HTML field (Multiline text) <a href="#" onclick="OpenDispPage('Table 1.1', 'table');" >Text</a> and this is what SharePoint makes out of it when I ...
3
votes
1answer
583 views

Can I use JavaScript in 'Edit in DataSheet' mode?

I would like to use some JavaScript in 'Edit in DataSheet' mode to check a value and prompt a user to enter some text. Is this possible?
1
vote
1answer
3k views

Why am I getting JavaScript errors in my extended web application?

I have extended a web application in SharePoint Foundation 2010. Added an AAM from "http://servername" to "http://portal". Accessing the site with the AAM address (http://portal) will come up however ...
2
votes
2answers
5k 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
508 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
652 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
205 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
447 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 ...
5
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
686 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
629 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
551 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.