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)

0
votes
2answers
2k views

How to get SPSite aka SPWeb property bags using ClientContext? [duplicate]

Possible Duplicate: Grab a specific property bag using ECMA script I would appreciate if some paste a sample code to get the property bags values using ClientContext?
2
votes
1answer
5k views

SPServices: trying to learn how to use this and jquery, help with example

So I am trying to learn these both as I read nuthin but great things all over the place about them. So this is what I have from example on codeplex: <script type="text/javascript" ...
1
vote
2answers
6k views

jquery checkbox checked and unchecked

i need to write a javascript code that make the checkbox if checked view a textbox and if not checked the text box is invisable automatically without having a button to click on it to do that ...
3
votes
2answers
742 views

SharePoint webpart and application page

I need to make an application page or a webpart that have a javascript code and i tried to add the jquery i a new project to upload it to the SharePoint but the code didn't work this is the code that ...
2
votes
1answer
887 views

What is the difference in GetCurrentCtx() and SP.ClientContext.get_current()?

Is there some reference to this subject? Both methods return completely different objects.
2
votes
4answers
6k views

How to add javascript and css to a SharePoint 2010 webpart?

What is the proper way (i.e. without having to manually copy the assets to any sharepoint folder or anything like that) to add custom javascript and CSS to a SP 2010 web part? I would like them to be ...
0
votes
2answers
179 views

Accessing template properties for a collection of sub webs using the ECMA Client OM

I am doing a Sharepoint project where I am displaying all subsites in a list on the home screen. I have set them up in a Microsoft Metro/Tiles design, so that each subsite represent one tile. I am ...
1
vote
1answer
223 views

Work around for calendar LVWP recurrence?

Is there any type of work around for recurrence issue for calendars? Everything I seem to find online about the topic leads me to believe that there isn't but its worth asking the experts! :) I am ...
0
votes
1answer
154 views

Can I query a DVWP with javascript?

Is it possible to query results in a data view web part with javascript? If so, how do you reference the DVWP in the syntax?
0
votes
2answers
1k views

Javascript How can I return a value for document.write in CEWP with javascript

I am new to this, and I am just trying to understand how to use some of the javascript I have learned in different ways. This may be a question of context, but an examples or explanation is always ...
10
votes
5answers
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
357 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
444 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
383 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
773 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
375 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
2k 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
550 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
309 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
512 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
223 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 ...
11
votes
3answers
5k 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
715 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
960 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
216 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
590 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
3k 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
891 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
514 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
3k 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
994 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
527 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
180 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
430 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
275 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
97 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
3k 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
185 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 ...
2
votes
4answers
13k 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
82 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
352 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 ...
4
votes
3answers
30k 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 ...