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)

4
votes
3answers
12k views

How to access list in SharePoint Hosted App?

I want to create an Sharepoint hosted app but how to access list in these App ??
5
votes
3answers
1k views

Unable to set “End Time” of Calendar through Javascript

I am trying to set default value of "End Time" field in Calender NewForm.aspx page. Here is my code: var txtDate = $("#" + $("label:contains('End Time Date')").attr("for")); var cboHours = $("#" + ...
2
votes
1answer
2k views

How to perform rowcount with a web service in Sharepoint 2010

Pagination loses some of it's luster with no knowledge of the total number of results. Is it possible to perform a "row count" with either REST or SOAP (getListItems) without getting back all of the ...
2
votes
0answers
792 views

Filtering SharePoint list items that have multiple values using jQuery

I have a SharePoint list that contains multiple columns of information. There’s a Category column that’s a look up to another list called ‘Category’. This is to produce unique ID’s for each of those ...
4
votes
1answer
300 views

Getting ctx for a specific webpart

My goal is to replace a text in a specific column by an icon using only javascript. function ReplaceTxtbyIcn(targetWP, targetColumn, pat, urlname) { var table = document.getElementById(targetWP); ...
1
vote
1answer
844 views

Getting the Item ID from the ECB (Edit Control Block) using JavaScript

I know I can use {ItemId} to pass it to the URL like so: <UrlAction Url="~site/_layouts/ConvertItem/ConvertItem.aspx?ListId={ListId}&amp;ItemId={ItemId}&amp;ItemUrl={ItemUrl}"/> ...
1
vote
0answers
360 views

display InputFormSection

Can we hide an wssuc:InputFormSection ?? I have a wssuc:InputFormSection made for adding items and it's only shown when you click on add link as the code shows : <Table border="0" width="100%" ...
1
vote
1answer
529 views

How do I convert this code to JQuery

I've been trying to convert this code to jQuery from Javascript but to no avail. This code is for adding a new item to a list which I took from the msdn website. It works in javascript but I need it ...
1
vote
3answers
509 views

How to load page load javascript when update progress is over

How to load page load javascript when update progress is over. $(function() { // how to load this after update progress is over } Explanation My Grid inside update panel.. In Grid some of ...
2
votes
1answer
45 views

SP Tools help - Not returning results

I have downloaded SPTools from github, and have followed the directions of uploading the files to a Document Library. When I try to open the index.html file from the document library, I get prompted ...
1
vote
0answers
157 views

Updating a value of any item in a list based on a selection of bool for one item - jQuery

So I hope this makes sense. I have a column within a list that I want to use as an active flag. There are 5 possible categories and for each category there can only be one active value. So I need some ...
4
votes
1answer
754 views

List Picker Dialog

I am attempting to use LaunchPickerTreeDialog js method to launch the OOTB SharePoint list picker. It works fine when selecting a list within the current web application however if I pass a parameter ...
1
vote
1answer
121 views

Site Template with Custom Pages: css, javascript?

If I create some custom pages that include custom html, css and jquery and this page exists within a site that is used as a site template, will that cause issues? From my limited experience with this ...
1
vote
3answers
728 views

Can sp.js be used in 2007?

I'm trying to use the code found at http://msdn.microsoft.com/en-us/library/hh185010(v=office.14).aspx under the section 'Adding a Web Part To A Page With Javascript'. However I cannot get a reference ...
4
votes
2answers
5k views

sharepoint 2013 rest api upload image

I want to upload image or create image in Sharepoint 2013 document library using rest api (Javascript) my code to get bite array from input type file element is var reader = new FileReader(); ...
1
vote
0answers
92 views

changing language on application page

I am using following code to change the language of HTML form on application page: <asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server"> ...
0
votes
1answer
932 views

Adding Javascript function on custom aspx page

I have created custom ASPX page in Visual studio for my SharePoint application. I want to use JavaScript function on this custom page like this: function ChangeLanguage(value) { var today = new ...
4
votes
3answers
11k views

Why does jquery's document.ready not fire?

In my master page, I have attached jQuery along with my own custom.js. I use the javascript in that file to run fixes on my pages such as style adjustments. Now, when I run simple functions on my ...
1
vote
1answer
322 views

tabbing out of menu item in sharepoint

When we are using tab key and we reach the site actions or welcome menu and press enter we can get inside the menu and then we can tab through the options.The issue I am facing is that when the last ...
4
votes
1answer
226 views

SharePoint XML Web Part dynamically adding xml link

Is there a way to dynamically insert a variable in the <XMLLink> --variable here--</XMLLink> tag? I'm trying to read an URL parameter which will contain the xml files path. What I am ...
0
votes
1answer
905 views

How can I get the ID/Name of the selected DocumentLibrary using JavaScript in MasterPage?

I want to get the ID/Name of the DocumentLibrary when I Click/Select on any library from List of libraries from the Left Panel of MasterPage. Can I call the function from MasterPage or where ? How ? ...
0
votes
1answer
87 views

Userfeedback after file was uploaded to library

I need to print out a feedback after a file was uploaded to a DocLib. I tried several things over the event receiver (add statusbar as a control or a clientscript) but everything faild. I´m a bit ...
3
votes
1answer
2k views

access a list in a subsite with Javascript

How can i access a list in a subsite? function Read () { var caml = "<View><ViewFields><FieldRef Name='Title'/><FieldRef ...
1
vote
1answer
137 views

Access a Sharepoint site from event handler

my problem is that I want to pop up a status bar in SP2010 after a File was uploaded via a single uploadform to a List. Found this in the net: ...
0
votes
1answer
111 views

Change Language in ModalDialog without reload

I´ve got the following issue: I want to change the Language of a .aspx Page, the NewForm.aspx. Therefor I created a WebPart which was added to the NewForm. <div> <a href="" ...
6
votes
2answers
10k views

How to return a value using context.executeQueryAsync?

How can I get this function to return the value? In all the examples I have seen, folks use an alert in the delegate functions, but I need to return the value instead. When I call the function, it ...
0
votes
0answers
121 views

Update WebPart MenuItem/Verb from Client Side

Here is the scenario - I have a custom webpart where I added one custom menuitem with client side handler, now my requirement is when I click on the menuitem some text should be shown, for example ...
2
votes
1answer
2k views

Calling Upload Dialog with javascript, can I pass value through to the edit form that follows?

I have a button that opens the upload dialog from a page using the below approach: function openUploadNewDocumentDialog(passingID) { var dialogOptions = SP.UI.$create_DialogOptions(); ...
1
vote
2answers
513 views

js/jquery doesn't work on site's upload.aspx?

is that right? If I go to a library in the designer, i can see upload.aspx there. Can't create a new one (and i guess that is because there is really only one per site, or collection?). Anyway, I can ...
1
vote
1answer
210 views

Google Map Visual WebPart

Some that has an guide on have to create an Visual WebPart using Google Maps for an list.... protected override void Render(HtmlTextWriter writer) { string rScript = ""; rScript += ...
2
votes
2answers
204 views

Is it possible to Fire event when Content type added in Shared Documents in sharepoint 2010?

How to fire event when any content type added in shared document library ? How to handle this event ?
3
votes
2answers
518 views

calling click event on dynamic controls

What I have is fairly standard code for using JavaScript with SharePoint 2013. Inside the sharePointReady function, I have a few dynamic controls that are added to the page. The problem is that when ...
1
vote
1answer
630 views

How to deploy custom context menu item?

I made a custom SharePoint application page and now I want to open it from edit control block (item context menu). My XML won't compile because it is telling me that I have illegal characters in the ...
2
votes
1answer
199 views

Why Isn't the Client Object Model as Vulnerable as I Think?

I can use any sort of console in Firebug, Developer Tools, etc. to access any Javascript included in a page and make calls to Javascript functions without a problem. If, on a SharePoint page, I use ...
2
votes
1answer
186 views

How can I fit a Datatable only into a webpart (not page) dynamically?

I develop a Webpart, which should be deployed in other SP-Farms. The Webpart contains a DataTable. I deployed the solution and the DataTable appears in the right side of the Website. I'm using a ...
3
votes
2answers
2k views

form validation

I am new in javascript. I want to validating a form with five columns. FormDescription My Form Contain 5 input fields and one submit buttom I want following output 1.Initially submit button ...
0
votes
2answers
324 views

COM: javascript/jquery method for creating a xml data file from SharePoint list data (multiple)

Does anyone know how I can pull off creating an xml data file from data in multiple lists using SPServices/Javascript/jQuery? I can certainly bring all the data I need out to a page and load into DOM ...
1
vote
2answers
3k views

SHarepoint 2010 - popup an image for 5 second after i open my site

How i can popup an image that display for 5 second as slogan/announcement after opening my sharepoint site welcome page As Example: http://www.lebanese-forces.com regards, Hass
1
vote
0answers
340 views

_spBodyOnLoadFunctionNames.push Not working in firefox

I tried this in firefox i dont know why its not working but it working in other browsers function loadmonth() { alert('called'); } _spBodyOnLoadFunctionNames.push("loadmonth");
0
votes
1answer
240 views

Why does javascript on the page stop the drop down menu working?

I have just inserted a javascript world clock via a text doc and a CEWP. However now that this is functional on my page I cannot see my drop downs from the top nav bar. It was working fine before I ...
1
vote
2answers
440 views

Sharepoint mechanism to add scripts to aspx page?

(a) Is there a mechanism (by sharepoint) of registering to include a script into the aspx page? (b) If yes, then if I do the following from a user control what would be the result? ...
1
vote
1answer
2k views

How to get files count from particular library?

I'm using Sharepoint 2007 and unfortunately don't have any ways to server site scripting, no C# or PowerShell. Is there any way to get total number of files in a given Library using SPServices ? It ...
1
vote
1answer
94 views

JavaScript wont show when non-admin log in but Administrator can

i added JavaScript to default.master in "http://localhost/_catalogs/masterpage/" via SPD 2007.the reason was for showing Date in every pages.i put this script on top page.find "showdate()". <table ...
0
votes
1answer
4k views

How to read URL/Description from a Hyperlink field using CSOM

Using CSOM (JavaScript) how do you get the URL and description fields from a Hyperlink field?
1
vote
1answer
158 views

Document download keeps restarting automatically

The problem: I want to open an excel document automatically from a custom aspx page in the layouts folder (sharepoint 2010) which refers to a document in a document library. The "DocumentUrl" is ...
0
votes
1answer
1k views

Upload a document in a specific folder

I would like to set a specific folder when I open the upload.aspx page to help. I tryed to look in the dll but the license of reflector is expired. UPDATED Maybe this post can help ...
0
votes
1answer
131 views

JavaScript array in SharePoint different in length from html?

Apologies for deliberately cross-posting, but I have an issue where a JavaScript array in SharePoint is showing a different length from HTML (and an incorrect one!) SO Question Updated original to ...
2
votes
2answers
204 views

Counting listitems multiple times with javascript

I'm using JS to get the number of (filtered) listitems to show on a dashboard. My functions work well when I call them once but I need to call them multiple times. Only the last call is processed. ...
2
votes
1answer
213 views

Open MultiUpload modal form

Could you please tell me how to open a MultiUpload modal form, without using or displaying the single upload form? <script language="javascript" type="text/javascript"> $(function () { ...
2
votes
2answers
778 views

Site collection relative url in XSLT search or by JavaScript

I have the following question: I'm modifying the XSLT of the search, so it is represented differently etc etc .. in this occasion I also need to get a relative site collection url. In managed ...