Followers
Thursday, July 29, 2010
JQuery for Everyone: Collapse Text in List View BY Paul Grenier
Monday, July 19, 2010
Sending an email in Sharepoint Using Javascript and Custom Forms
Sunday, July 11, 2010
JavaScript for SharePoint List field to populate data from query strings
Edit SharePoint Field properties, including lookup column list association, with client side code only
SharePoint Data View Web Part Extension Functions in the ddwrt Namespace
SharePoint: Populating Drop Down List Field with Data from Different Site
Wednesday, July 7, 2010
Writing Custom Web Services for SharePoint Products and Technologies
Tuesday, July 6, 2010
Customizing Sharepoint List's NewForm.aspx "OK" button click
Setting SharePoint Form Fields Using JavaScript
How to dynamically populate a drop-down list by calling a Web service in InfoPath
Friday, July 2, 2010
Customizing List Item Forms in Windows SharePoint Services
Querying SharePoint List Items using jQuery
Programmatically create a custom SharePoint list from a repeating table in an InfoPath web-based form
Thursday, July 1, 2010
Autopopulation the list items in the Sharepoint List
I came to across writing a script where my users wanted have the people picker autopopulate with the current user Name.
Here is the code guys
_spBodyOnLoadFunctionNames.push("fillDefaultValues");
function fillDefaultValues() {
var qs = location.search.substring(1, location.search.length);
var args = qs.split("&");
var vals = new Object(getUserDisplayName());
var assignedToInput = getTagFromIdentifierAndTitle("div", "", "People Picker");
assignedToInput.innerHTML = vals;
for (var i=0; i < args.length; i++) {
var nameVal = args[i].split("=");
var temp = unescape(nameVal[1]).split('+');
nameVal[1] = temp.join(' ');
vals[nameVal[0]] = nameVal[1];
}
}
function getTagFromIdentifierAndTitle(tagName, identifier, title) {
var len = identifier.length;
var tags = document.getElementsByTagName(tagName);
for (var i=0; i < tags.length; i++) {
var tempString = tags[i].id;
if (tags[i].title == title && (identifier == ""
tempString.indexOf(identifier) == tempString.length - len)) {
return tags[i];
}
}
return null;
}
function getUserDisplayName() {
var tags = document.getElementsByTagName('a');
for (var i=0; i < tags.length; i++) {
if(tags[i].innerText.substr(0,7) == 'Welcome') {
return tags[i].innerText.substr(8,tags[i].innerText.length);
}
}
}
Thanks to SkillCrusher's Blog for putting some light on it
http://blogs.vbcity.com/skullcrusher/archive/2008/04/10/9024.aspx