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)

11
votes
6answers
4k views

“a is null” error in vanilla SP2010 install

I'm setting up an SP2010 VM for dev testing purposes. Our vanilla install has no other components present and is throwing JS errors in Chrome and Firefox. In Firefox (v13): a is null ...
1
vote
2answers
2k views

disabled dropdown has value reset

I have a dropdown in an edit form that is disabled via jquery/javascript. When I go in and edit an item/record, save it, and reopen it, the selected value in the dropdown gets reset to its default ...
2
votes
2answers
1k views

JavaScript with CEWP using ClientContext, do I need to add src to tag?

I am new to SP Dev and I am trying to add some CEWPs that reference javascript I have placed in text files and uploaded to a document library. For bland functions it seems to work fine, however for ...
0
votes
1answer
379 views

Inherited Page Viewer Control - allowTransparency on iframe

I created a custom control that inherits from PageViewerWebPart. Now I need to toggle the allowTransparency attribute to = "true" on the rendered iframe to enable background transparency for the page ...
1
vote
1answer
527 views

How to get server datetime without postback using JSOM or services

My application page may be long time without reloading, and user changed system date and time. And I need to know datetime from server, not from client.
1
vote
0answers
469 views

List Item file attachment using ECMAScript Object Model

How to simply upload & attach file to listItem using Javascript? And how to get/download attachments.
2
votes
1answer
800 views

Inject Script Block after SP.js loads

I have a giant script block inside my code file and I want to load it after SP.js loads. I've looked at ScriptLink, but I don't think ScriptLink injects code, it only injects code files. Is there a ...
0
votes
1answer
394 views

SPRibbon Button Unique Button Commands

I basically have a WP with its own custom Ribbon Buttons and Commands. The command's are hard-coded inside the the Elements.xml. However, the webpart basically breaks once you add another "same ...
1
vote
1answer
3k views

sharepoint onload set radio button value using javascript

Set choice field value using java script : I have a choice field with values : Open Closed Cancelled When my page loads, my choice column should be selected as "Cancelled"(i don't want to set ...
2
votes
2answers
3k views

Automatically zoom-to-fit in Visio Web Access ASPX

I'm trying to set the zoom level of a Visio document which is shown through the Visio Web Service. http://mysite/_layouts/VisioWebAccess/VisioWebAccess.aspx?id=/Shared%20Documents/MyDiagram.vdw I ...
0
votes
5answers
577 views

looking for javascript reference that's in master page

An old version of jquery is being loaded into my masterpage and I can't figure out where it's coming from. Looking at the masterpage, I see SharePoint:ScriptLink ID="ScriptLink1" ...
1
vote
1answer
336 views

Sharepoint Foundation - How to add second script (google widgets)

I've a problem, because when I add first script (google widgets) to my Sharepoint Fundation at the beginning every looks like good but when I edit page in HTML source code, code is different and when ...
0
votes
2answers
563 views

client object model and jquery not loading — sort of

I'm getting some data from a list via the client object model. After I get the list data, and the page loads, I want to use a little jquery to add a hover effect. Easy enough, right? Well ...
1
vote
1answer
229 views

Possible to have a SPRibbonPostbackCommand and SPRibbonCommand at the same time?

I'm happily using SPRibbonPostBackCommand to a custom save button. It generates a Postback and everything is fine and dandy. Previously to generating a Postback I would like to make one Javascript ...
12
votes
3answers
6k views

Grab a specific property bag using ECMA script

I am trying to grab a key/value pair from a specific property bag but can't find any documentation or example code on how to grab a property bag. Currently I can only seem to grab allProperties. Here ...
1
vote
1answer
2k views

Show list form DispForm.aspx “in window” instead of as a dialog box

Does anyone know how to get a list form to display as an aspx page by default instead of as a popup iframe? For example, when a user clicks on a list item, DispForm.aspx opens as part of the same page ...
1
vote
1answer
776 views

SharePoint 2010 Ribbon Customization (Copy/Paste List Item Properties)

I have a requirement to copy and paste only the properties of a document library item. There must be two button on the Edit-Form.aspx ribbon that allows me to copy and paste only the properties. I ...
1
vote
2answers
1k views

How to access the property bag in Javascript?

I want to access my property bag using Javascript from a <CommandUIHandler Command="FCS.Intake.Tab.Reports.TL" CommandAction="javascript: function getWebProperty() ...
0
votes
1answer
228 views

How do I fill a webpart with list values I have retrieved with ECMAJS SP2010

New to SP dev, but recently learned how to retrieve data from lists using ECMA with CAML. Added a CEWP, wrote the script to retrieve the data and it is working fine, multiple field filters, etc. ...
7
votes
4answers
2k views

How to access a Web application/Farm level property bag via jQuery/Javascript/ClientContext

It it possible to access the Web application/Farm level property bag using jQuery/Javscript/ClientContext? If not, then what are the possible alternatives to access Web Application Farm level property ...
0
votes
1answer
644 views

How can you have multiple fillDefaultValues scripts operating on one page?

I have a Web Part Page with multiple DVWP/New Item Forms for different lists. Each form contains a lookup field to one central list. I can get one form to auto-populate the lookup field with a query ...
1
vote
1answer
4k views

Get UniqueId from listitem with Javascript/Ecmascript (Sharepoint 2010)

Is it possible to get the Unique Id from a listitem in a custom SharePoint 2010 list? I've added a custom ribbon action so far where I can get the id, but that's an integer (0,1,2,3,...) I need the ...
3
votes
1answer
983 views

Hide upload Button on Asset Selector Dialog (AssetPortalBrowser.aspx)

I am looking to hide the "Upload" button in Asset Selector Dialog and I know Asset Selector Dialog uses Dialog.master in SharePoint. Is there a possibility to attach some custom jQuery/Javascript ...
3
votes
3answers
540 views

jquery projects and visual studio best practices?

Just curious how others are handling their jquery related solutions. It's obviously very easy to add a Content Editor web part with a content link to a source file. That file could have your ...
0
votes
3answers
4k views

Get Sharepoint data synchronously with JavaScript

I was wondering is there some way to get list items form SharePoint with JS synchronously. All methods I've found required to specify a callback method. As I am building a custom JS validation for ...
1
vote
2answers
1k views

Is it possible to change the visual style of a JSGrid row?

I am working on a SharePoint solution using the SharePoint JS Grid control to display data. What I'd like to do is to change the default style (mainly background color) of specific rows in the grid to ...
1
vote
2answers
570 views

Icon-based menu that dynamically changes based on permissions

We're trying to create an square grid, icon-based menu that is permission trimmed (certain icons appear based on your specific SP permission group), that dynamically rearranges the icons based on your ...
0
votes
1answer
181 views

Sharepoint 2007 Windows Gadget [closed]

I am trying to develop a Gadget for Sharepoint 2007, which will authenticate a user and then fetch him a sharepoint list from a specific URL, For the last 4 days I have been working on it and came ...
0
votes
1answer
585 views

What operator works for equal in td .ms-vb2?

I have used td .ms-vb2:contains but I need to match an exact value in a cell.
0
votes
1answer
293 views

Programmatically set src attribute for JavaScript link on masterpage?

The dev site was set up as a subsite in a site collection with the URL http://server/sites/site but on the production server it's just http://site so the src attribute on the dev box <script ...
0
votes
2answers
98 views

c# and JavaScript

So i have this code sb.AppendLine( "var nameSplit = users[i].split('\');"); The sb.AppendLine is C# and the bit inside is JavaScript, I am trying to split users[i] so that I can strip out the ...
4
votes
1answer
4k views

Sharepoint 2010 Calendar View in Custom List Expand All by Default

For some reason the scripts I have found on the web (ie: http://social.msdn.microsoft.com/Forums/en-GB/sharepoint2010general/thread/a24da49a-7fc8-47c6-a125-95e4a5b2d095) are not working with a ...
0
votes
1answer
186 views

Where to find a complete list of document action functions in JS

I'm tasked with taking an inventory of all document action functions in core.js Is there a list somewhere online that provides a list of all user options from a document list menu? [If I can get it ...
2
votes
1answer
2k views

Javascript call to NewItem2 error “TypeError: Cannot read property 'tagName' of undefined”

Overview I have a CustomAction for a button on the ribbon that calls a command in a javascript file. The command fails in the inplview.debug.js file on the following lines (1745 - 1748) in the ...
-1
votes
2answers
1k views

Disable the Drop down column based on the text value…!

I am working with SharePoint 2010 form library. I have a drop down column which is dependent on text input column value . The value in the Text input column comes from the infopath form. What i ...
3
votes
4answers
16k views

Using Javascript in SharePoint

I have a number of projects that could benefit from JavaScript. I've seen a lot of "Oh, you can use JavaScript for that!", but little detail about how and where that's done. Does the script live on a ...
0
votes
1answer
86 views

Make my JavaScript run after SharePoint JavaScript

In SP 2003 how can I make sure my JavaScript is the absolute last script to be run.
1
vote
1answer
380 views

SharePoint 2003 PreSaveAction() to make attachment required

I asked this question in the main SOF forum but I think it belongs here. http://stackoverflow.com/questions/10415929/sharepoint-2003-presaveaction I need to add a little JavaScript to run when user ...
5
votes
3answers
38k views

SP.ClientContext.get_current() returning undefined objects

I am trying to get some information about the current context through the sharepoint javascript object model and am getting annoying errors. $(document).ready(function () { ...
0
votes
2answers
4k views

How to correctly get a JavaScript SP.Web object's ID and URL before loading

I was working on a project where I needed to get the current web's ID or URL (sometype of unique identifier) in javascript without making an service call (executeQueryAsync). I didn't seem to be able ...
0
votes
1answer
3k views

SPServices UpdateListItems Will Not Update Target List

I'm trying to copy items from a list in one site and update/paste them into a list in another site, but I can't get it to work. Please help. I have my references to jQuery and SPServices in the master ...
3
votes
2answers
685 views

Generate file then close SharePoint dialog page

I have a custom solution where I open a SP Dialog box through Javascript. From this dialog, I want to generate a file and sent it to the user when he is clicking on a button, than close the dialog. ...
3
votes
3answers
2k views

How can I implement SharePoint JSGrid filtering and grouping functionality?

I am working on SharePoint JSGrid. I am able to implement the sort functionality in JSGrid. Now I want to implement the grouping and filtering in my custom JSGrid. For filtering we have to attached ...
1
vote
1answer
116 views

Lost navigation when testing on one Web Front-End server taken off Load balancing?

Last week we experienced a phenomenon which didn't make sense (to me). We have an environment with one SQL Server and two Web Front-End servers in the Farm. Upon deploy one WFE were removed from Load ...
0
votes
1answer
71 views

Get ChromeType from within current web part

How do I retrieve the ChromeType for the current running web part from within itself (something like "this.Chrome.ChromeType")? If the ChromeType is something other than "None" I want to add some ...
1
vote
2answers
1k views

Selecting single user from User Information List

I've got a problem with not being able to select a single list item from the User Information List, I have used U2U CAMLbuilder to build a query that extracts an entry with the ID = 1 When run in the ...
1
vote
2answers
525 views

Using javascript to create InfoPath form in a SharePoint library

Are there javascript / javascript framework that allows developer to create InfoPath Form in a SharePoint Library? Suppose there is a SharePoint Library called 'Finance Application'. When a user ...
2
votes
2answers
572 views

How do I create a new view from an existing view using ECMAScript?

I wrote a script with ECMAScript to create a new calendar view with a click of the button by using: this.viewCollection.add(viewInfo); However, I'm wondering if it is possible to create the view ...
4
votes
1answer
2k views

SharePoint RTE: How to attach to mousedown events (like bold, italic does)

When clicking on bold text in the RTE (rich text editor), magically the ribbon button for bold: get's activated. The same happens for the other format option buttons you can see on the screenshot. I ...
2
votes
1answer
2k views

Incorrect Modified Dates on SharePoint Online for clients in other timezones

I've run into a strange problem with SharePoint Online. When updating or creating entries in a list using the Client Object Model, the modified date on the affected list item seems to be stored with ...