Month: February 2007

Quicknote – writing a uk date in C#

No Picture

If you are writing out datetime.now on a machine set to en-gb, you should not need to worry about globalisation if you require uk formatted dates. However if you do need to force the format, you can using…

Read More »

JavaScript: Setting up a scrollable readonly text box

No Picture

To make a text area readonly through JavaScript whilst allowing the scrollbar to function correctly do the following: document.getElementById(“theTextArea”).readOnly = true; document.getElementById(“theTextArea “).style.color = “#777”; document.getElementById(“theTextArea”).style.backgroundColor = “#EEE”; Alternatively, you could do document.getElementById(“theTextArea”).disabled = true; but the scrollbar…

Read More »

SPPS 2003: Setting up advanced search

No Picture

A quick reminder on how to setup advanced search in SharePoint (just in case I forget – its pretty intuitive to set up, but I do it infrequently). Enable advanced search Go to portal settings page Click configure…

Read More »

SharePoint 2003: Impersonating and using administrative functions

No Picture

I have a case where I need to perform administrative functions (i.e. from the Microsoft.SharePoint.Administration namespace) on a custom page running in SharePoint. The page may be accessed by a user who does not have administrative rights, but…

Read More »

SharePoint: Setting meta data properties whilst adding a file to a doc library programmatically

No Picture

Just a quick note… I have a versioning document library in SharePoint 2003, and am trying to upload documents to it programmatically. Unfortunately, the only way to set some meta data properties is to update the associated splistitem…

Read More »

General: Getting docs to open in application as opposed to browser

No Picture

To get internet explorer to open documents in the native application instead of the browser window, you must alter a computer setting (not an Internet Explorer setting). Open windows explorer Select tools then folder options from the menu…

Read More »

JavaScript: Dynamically adding an onclick event

No Picture

The code below shows how to dynamically add an onclick event to a checkbox input element. The most important thing to note is that onclick must be set using a reference to a function (i.e. with no parentheses)….

Read More »