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
3answers
951 views

javascript issue in sharepoint

I am having issues making a javascript work. Basically i just use this script for different web parts which have the .q1table class to insert some other classes. I am getting an error uncaught type ...
1
vote
2answers
504 views

Pushing data from a classic ASP site to SharePoint

We have a publicly facing classic ASP site and I need to capture some data from that site and push it to SharePoint and vice versa. There are a few options as far as I know; Writing a custom web ...
1
vote
1answer
780 views

SPWeb is undefined

I am a newbie in sharepoint and only for 1 month. I am using sharepoint 2007,.aspx. and doing for an email form with some validation, after user pass the validation the email send. But I'm getting the ...
2
votes
2answers
6k views

Getting value of column in selected rows from list

I am trying to get selected rows in the list and select ids for the pdf generator. Debug stops after context.load(rows) and nothing happens after that till I reload the page. If remove code for ...
1
vote
1answer
725 views

Method behind attachment, for custom pages

This may be a poorly formed question, but I'm fairly new to sharepoint. What I'm doing is creating a custom page (just basic HTML and JS), and using that page to call SPAPI and SPServices to input ...
2
votes
1answer
604 views

How to print document library item from ribbon button

I'm creating some custom features to add functionality to the ribbon. I have created a button to print the page you are viewing very easily like that: SPItem containing elements.xml: <?xml ...
0
votes
1answer
2k views

CheckBox header to select all checkBoxes in SPGridView

I have a webpart with SpGridView. <SharePoint:SPGridView ID="grid" AllowSorting="true" AllowFiltering="true" CssClass="ms-listviewtable" runat="server" AutoGenerateColumns="false" ...
0
votes
3answers
183 views

How to stop SharePoint from writing JavaScript code over and over?

I'm using PIE.js to force IE7 to use CSS3 styles. However, whenever an element on my SharePoint page contains the class that PIE is supposed to style, it actually inserts the code into the html when ...
1
vote
1answer
3k views

SP.js and Mootools?

I created a custom .aspx page in sharepoint designer that uses sp.js and I reference it like this: <SharePoint:ScriptLink ID="ScriptLink1" Name="SP.js" runat="server" OnDemand="false" ...
2
votes
1answer
648 views

Custom Ribbon command greyed out in IE8

I have created a simple Ribbon command that hides the header, footer, and ribbon via jQuery. It then calls window.print() and unhides the previously hidden divs. It works great on my development ...
1
vote
2answers
4k views

SPServices GetListItems don't work most of time

I'm using SPService in a list for take some information from an other list. It works just sometimes... I need to refresh lot of time before it works .... Here is my code : <script ...
0
votes
4answers
3k views

How to verify in Javascript Object Model if a List Exists

How can I verify if the list I'm trying to retrieve in Javascript really exists? My code is: function Search() { var context = SP.ClientContext.get_current(); this.site = context.get_site(); ...
2
votes
6answers
10k views

How to add Some Javascript code to all the aspx pages not just on web parts?

I just want to modify some of the contents on all the SharePoint pages be it adminstration page or some site page or any other page using my script (Javascript) and AJAX code. My ultimate aim is to ...
2
votes
1answer
494 views

Globally intercept dialog close?

I have on a home page of one application a list view webpart. When a user click on the item title, a modal dialog is displayed to display the item. Is it possible to intercept the closing of the ...
2
votes
1answer
1k views

How to see if current user exists in people and groups field, using ecma/client-object-model

I have a list which has two fields. (Title,EditPermission). The EditPermission is "people and group" field. I can use the following code to compare the current user with the spuser in that field ...
2
votes
1answer
454 views

Get single field item value from Custom List and set it on same item but another field

I'm new in Sharepoint, and I have an issue with a custom list in Sharepoint 2007. The thing is... I have a custom list with pre-loaded data, and I need to get a unique code from a field item, to put ...
3
votes
1answer
2k views

JavaScript OnLoad and SharePoint does not work

I have tried this <script type="text/javascript"> function myfunc() { ExecuteOrDelayUntilScriptLoaded(GetSuppliers, "Directory.js"); }; ...
0
votes
1answer
488 views

Simple jQuery to extend page body if Quick Launch has been toggled SP2010

Beginner. I have a link that expands a single page onclick with the following jQuery: <script type="text/javascript"> var $j = jQuery.noConflict(); function toggleQuickLaunch() { ...
1
vote
3answers
4k views

Sharepoint DateTime control, how to call client side as well as server side on datechanged

I am having a datetime control in sharepoint custom webpart <SharePoint:DateTimeControl runat="server" ID="txtUKdtofAdm" LocaleId="2057" DateOnly="True" ...
9
votes
3answers
7k views

How to get the ID of the list item just inserted using ecmascript

I am stuck at a place where I have to update a list which has a Lookup column. For example I am using this code to update my normal list var clientContext = SP.ClientContext.get_current(); ...
3
votes
2answers
861 views

Client Object Model equivalent of SPWeb.SiteLogoUrl

I can get the name, url and description of a site using SP.Web but there is no logo property. Is there a javascript COM equivalent to ...
1
vote
5answers
4k views

JS/jQuery Check if on root web of root sitecollection

How is it possible to check in JS/jQuery if the user is on the root site of the root sitecollection in the webapplication? (Sharepoint 2010) Thanks! Example: ...
1
vote
0answers
554 views

Modal Dialog Delegate Event not firing

I have a modal dialog that I call from my sender page: function openCommentsDialog( ITEMID) { var DropDownListValue = document.getElementById("HideVal").value; var options = ...
0
votes
1answer
322 views

CEWP with Calendar New Form : hidding selections, setting all day by default

So I came across a cool trick first in a book, then on a blog (here!), but it doesn't work for me. It's straightforward enough, couple lines of javascript/jquery, and a cewp in order to auto-select ...
1
vote
0answers
239 views

Validate list item with javascript API

I want to develop a custom datasheet view to edit a list. I add item through the javascript API. The problem is that the service doesn't control fields value. For example : - I add an item with a ...
2
votes
1answer
724 views

Javascript is changing in Content Editor WebPart

I want to add this a Widget in my sharepoint site. But every time someone edit the page, it mess the script. Someome knows why sharepoint is changing the script? And how to avoid it? The script that ...
1
vote
0answers
74 views

How can I authenticate to BPOS SharePoint using JavaScript

Does anyone know where I can find resources explaining how I can authenticate towards BPOS SharePoint using javascript? I have managed to authenticate with Office365 building on the scripts of lstak, ...
2
votes
2answers
6k views

SP2010 Using Modal Dialog for Forms : Beginner Questions

So I am trying to figure out how to use some java script in order to use a modal dialog to display new item form. The below is what I have thus far, but its not working and I am not sure what portion ...
1
vote
3answers
3k views

Print from Modal Dialog

I would like to print everything in a newform.aspx/editform.aspx modal dialog. I was considering creating a Web Part or a bit of JavaScript that was nothing more than a print button that specified ...
0
votes
2answers
2k views

Multi select Lookup column returns null in javascript client object mode;

I am trying to retrieve the selected values of multi select lookup column and store them in array and then set the lookup column with the same selected values after drop down value changes but always ...
2
votes
2answers
3k views

How to include .js file from location different than “_layouts” folder to sharepoint master page?

I would like to include js file from different location that it's now. Currently in master page code it looks as below: <SharePoint:ScriptLink ID="ScriptLink1" language="javascript" ...
6
votes
1answer
3k views

no sorting with JavaScript Client Object Model?

I have the following JSOM code: var query = "<View><Query><Where><Eq><FieldRef Name='Category'/><Value ...
1
vote
1answer
518 views

anchor tag in SharePoint master page

Hi can someone help me in putting up a anchor tag in SherePoint custom publishing master page. Actually I want to open a site page on click on this anchor tag, this site page will be in the top level ...
4
votes
2answers
11k views

SPService GetListItems with CAML : can't get example to work

enter code hereI am using an example I found on codeplex of SPServices with CamlQuery to try to get list item values with where clause on the ID. For whatever reason this doesn't seem to work for me; ...
1
vote
1answer
2k views

To check edit permission on a specific list using ecma script client object model

Users will have read permission at web level but in some scenario few users can have edit permission on just one list under the web (role is broken for the list and explicit permission is given on the ...
0
votes
1answer
206 views

SPServices: Using variable as column name - possible?

When using SPServices, is it possible to use a variable to specify the column to be updated? res = lists.quickUpdateListItem('MyListHere', { ID: ReqD, columnVar : userName }); In the above ...
0
votes
2answers
5k views

How to get List Name from JS Object Model - List Name from URL problem

I'm trying to connect Ribbon to Pages.. This works, javascript get what I need and pass as parameter to my page.. I pass the URL and the SelectedItemsID.. I'm facing a problem: If I had a List ...
1
vote
0answers
146 views

will SP.ClientRuntimeContext.add_requestSucceeded stack events?

I'm looking for a new way to throw some tracking into list-based user actions (i.e. through ECB) and I stumbled accross SP.ClientRuntimeContext.add_requestSucceeded (see ...
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
6k 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
8k 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
772 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 ...
3
votes
1answer
1k 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.
3
votes
4answers
8k 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
183 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
238 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
156 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 ...
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 ...