Tag Info

Hot answers tagged

3

xData represents the returned data, it could be replaced with foo or blah or whatever you'd like. Status represents the status of operation, off hand I don't remember if it is the status code (like 200) or status text (like success). I rarely use status and rely on the xdata returned in doing logic checking.


2

I do remember having a similar problem to this in the past. The SP.js never loaded on Published pages. Because it's not loaded, the file is not able to call SP.SOD.notifyScriptLoadedAndExecuteWaitingJobs and hence the call to ExecuteOrDelayUntilScriptLoaded will never run. In order to load the file from the SOD library, use the following: ...


2

The dataview web part is executed server side, so you can't use jQuery to manipulate the SelectCommand. You would need to remove rows from the DOM with jQuery after the web part has loaded. I would use jQuery to hide the web part initially. Then, make your SPServices call to get the user's Office. Then iterate over each row of the table and if the Office ...


2

It seems that you would want to upload an excel document to a document library and while that happens, do stuff. One way to achieve this is creating an event receiver that captures the ItemUpdated event. For the "do stuff" part, you can use the openxml api, which will allow you do read data from the excel document and populate it in the list. here are a ...


2

You have to use JQuery Plugin. Wrap your panel elements inside a single div and create a close button for popup for example <div id='popup-wrapper'> <asp:panel.... All Text Boxes /> <a id="close-btn" href="#">Close</a> </div> Add following references to your page <script type="text/javascript" ...


1

You can always scrape it from the DOM if you need to. The exact code will depend on what version of SharePoint you are running. Open your favorite browser's developer tools, and search the DOM for your name. In this example, I'm using an Office 365 site: In this case my name is in a div with the ID of SuiteNavUserName, so the code would be... ...


1

I've never seen a plugin however; its not too difficult to do this on your own. There is a JavaScript function in SharePoint called "PreSaveAction" that is fired just before the item is validated and saved. You can use this function to call your function. For example: function PreSaveAction(){ var itemTitle = $("input[title='GUID']").val(); if ...


1

If you just need to access the values, you could do it like this: var dispTitle = "APickerField"; var pickerDiv = $("[id$='ClientPeoplePicker'][title='" + dispTitle + "']"); var peoplePicker = SPClientPeoplePicker.SPClientPeoplePickerDict[pickerDiv[0].id]; peoplePicker.GetAllUserInfo(); The GetAllUserInfo() returns an array with one index pr ...


1

There is no "root" site collection in SharePoint, just a site collection at the main domain address. It's not any more important or noteworthy than any other site collection. Either load it from an absolute url at that site, store it on the hive or load it from a third party CDN (https://developers.google.com/speed/libraries/devguide#jquery)


1

You should be able to change the reference URL to something more specific, like the full URL of the site collection, or your CDN, like name="https://mydomain/sites/here/jquery.js"


1

I too think this is an out of order script loading. Although: this is the first time I'm hearing about jQuery interfering with core.js and others. Because CEWP are inserted into the Body other page - thus after the HEAD script files - is what makes doubt this is a timing issue. SP (2013... And maybe 2010 too) uses a global variable called $, so maybe ...


1

I just found the answer myself here: http://blog.pathtosharepoint.com/2008/10/25/expandcollapse-buttons-for-your-web-parts/ Worked perfectly. Allows open and close of CEWP with one click, and you can still edit their content in the wysiwyg editor.


1

One of the ways to achieve the same result is to use knockout.js. You can use knockout.js and populate the data using a foreach loop in a observable array. And in the Web-Part you need to map the knockout data member. This is good because you will use object oriented JavaScript and MVVM. And code will be little less. Please check the following code: ...


1

The relationship between .html and .master is a bridge. It has been implemented so that developers who are not familiar with ASP.NET masterpages and SharePoint can use the .html file to do the changes in a "environment" they are more or less familiar with. I'm going to assume this is an on-premise solution, so yes, downloading and putting the .js file in ...


1

I have a list MyTestList. It has currently two views TestView1 and TestView2. To add serial number in the front follow the following steps: Open the site in SPD Open the List Edit the view in Split mode Select the List, Go to 'List View Tools' in the Ribbon > 'Design' > 'Customize XSLT' > 'Customize Entire View' This will convert the view in detail xslt ...


1

You can use SPD. On a page add the list view, then create a column and insert the following code: <xsl:value-of select="count($thisNode/../*[not($thisNode/@ID=preceding-sibling::*/@ID)])" /> It should render the row number, no matter if you change the view order or filter some information. Hope this helps



Only top voted, non community-wiki answers of a minimum length are eligible