9/13/2013

wssdemo.com has moved

 

I show the wssdemo.com web site in almost every SharePoint class. This week I typed the url into a browser to show the Silverlight Pivot control and only got a 404 Not Found error! Well today I found the the site… it has a new URL and no forwarding from the old URL. The new URL is:

www.SPSDEMO.com

8/02/2013

PowerShell to the rescue (again!)

 

Using PowerShell to replace text in a file.

I have a custom class next week. I need to make a little fix to the lab files… actually 526 .css files and 380 .htm files need to be updated with several fixes in each. Lots of little fixes.

 

How did I know how many files?  PowerShell of course…

(Get-ChildItem *.css –Recurse).count

 

Find and replace some text…

First update was to fix some URLs. I needed to remove a backslash at the start of every "href=" and "src=".  A little PowerShell could also do all of the file edits!

$from = 'href="/'
$to = 'href="'

Get-ChildItem *.htm -recurse |
%{
     $name = $_.fullname; Write-Host $name; (Get-Content $name) |
     %{ $_ -replace $from,$to } |
     Set-Content -path $name –force
}

I wrapped the above line in a function, called it eight times with my eight replacements, and it was done in seconds!

 

Notes:

Find all of the files…

  Get-ChildItem *.htm -recurse

and run some code on each one:

   %{   }

Save the file path to a variable, display the file path and then get the file's contents:

   $name = $_.fullname;
   Write-Host $name;
  (Get-Content $name)

The pipe then has the text to be replaced, so let's do the replace:

   %{ $_ -replace $from, $to }

And write the replaced text out to a file with the same name:

   Set-Content -path $name –force

 

.

6/03/2013

Free SharePoint 2013 Webinar

 

Tomorrow I will be giving a one hour webinar with MAX Technical Training on what's new in SharePoint 2013. This will include both the what's new bullet points, and a lot of little things I've found over the last year or so. Grab a sandwich and join me for a SharePoint lunch and learn!

Tuesday, June 4th from 12-1 pm
   
Reserve Your Webinar Seat Now

What's New in SharePoint 2013 - Features and User Interface

SharePoint 2013 is now in its 5th generation. While 2013 appears to have changed dramatically you will find that it is an interesting mix of unchanged features that you and your users already know, and a lot of new functionality that you will be exploring for the next few years.

In this webinar we will try to reduce the "fear of change" by showing you what has not changed while also showing how many new features and changes will add value to your world of information management and sharing.

Our presenter, Mike Smith, is a SharePoint Microsoft Most Valuable Professional (MVP), Microsoft Certified Trainer (MCT), Senior Technical Instructor with MAX Technical Training and author of the book: SharePoint 2007 and 2010 Customization for the Site Owner.   

.image

6/02/2013

SharePoint Versioning Trivia, or maybe a start on a versioning FAQ

 

The number of versions retained is one more than the limit you set. Entering 10 as the version limit will keep up to 11 versions of the item. I guess the current "version" is not counted as a "version".

image

Then maximum number of versions per item is 5000. (at least in SP 2010)

image

We you exceed the version limit the oldest item is immediately discarded. It is not moved to the recycle bin.

Only libraries support Minor or Draft versioning. Lists only support major versions.

The maximum number of draft versions is 511, and you can't change that number. Attempting to create a 512th draft version generates this error:

image

"Keep drafts for the following number of major versions" will automatically discard minor versions of published major versions over the entered limit. Actually… it will keep one less than you probably expect.

image

For example, if the limit is 3 and you have some unpublished drafts, then you will see drafts from the previous 2 published versions plus the current drafts:

image   (click image to enlarge)

Notice that you see 13.1, 14.1, 15.1 and 15.2, but not 12.1. Three sets of drafts as expected. Now let's publish 15.2 into 16.0:

image(click image to enlarge)

Now we only have two sets of drafts, 14.1 and 15.1.

 

Clicking "Delete All Versions" actually deletes all but one version. The latest version is retained.

Reducing the version limit will not automatically delete excess old versions. The excess old versions will be deleted the next time the item is deleted. (You can create a PowerShell script to clean out the excess versions.)

Visitors to the site can see all of the old versions by default. You may want to edit the Read and View Only permissions levels to remove the "View Versions" permission.

Major version numbers are assigned internally using “version number” times 512. You can see this when display a version of a list item. Example of a direct URL: http://intranet /Lists/Announcements/DispForm.aspx?ID=1&VersionNo=1024
No that’s not version 1,024! Version numbers are assigned using “version number” times 512. Version 1 is 512, version 2 is 1024, version 3 is 1536 (i.e. 3 * 512), version 4 is 2048 (i.e. 4 * 512) …

 

Notes for developers and PowerShell scripters:

Versioning related properties of SPListI:

  • .MajorVersionLimit – the "Keep the following number of major versions" field in Versioning Settings
  • .MajorWithMinorVersionsLimit - the "Keep drafts for the following number of major versions" field in Versioning Settings

Versioning related properties of SPListItem:

  • .Versions – a collection of retained versions
  • .Versions.Count
  • .Version[0]  gets the most recent version of the item
  • .Verions[x] where x is .Versions.Count, is the oldest version of the item (i.e. versions are stored in reverse order)
  • .HasPublishedVersion   -  boolean

 

Here's a little PowerShell script that will take the first document (ID=1) in the Shared Documents library and create 10 major versions, each with two minor versions.

# before running this, enable major and minor versioning on the library

# get the web site
$web = Get-SPWeb http://intranet.contoso.com

# publish the first document 10 times
for ($versionsToCreate=0; $versionsToCreate -lt 10; $versionsToCreate++)
{
  # get the document
  $doc = $web.lists["Shared Documents"].getitembyid(1)

  # create two minor versions
  for ($x=0; $x -lt 2; $x++) { $doc.update() }

  # publist the last minor as a major version
  $doc.File.publish("")
}

5/15/2013

Adding a scrolling list of messages to SharePoint

 

Tested in SP2010, SP2013, Office 365 2013 and should work in SP2007.

I have not offered up a cool SharePoint trick for a while… so here's one that takes a list and turns it into a scrolling "marquee" list like this one:

Release B.2 of the CRM system has been released!

Bugs have been found in B.2, please revert to B.1!

The "Dealing with procrastination" meeting has been rescheduled

Get Started with Microsoft SharePoint Foundation!

This uses the <MARQUEE> tag that may not work in every browser. But according to this page it works in at least these browsers: Chrome 1+, Firefox 7+, Internet Explorer 2, Opera 6+ and Safari 1+.

The code to do this was copied from one of my older tricks "SharePoint: Convert a Links list to a Dropdown list" with only two updates: change the dropdown list to a MARQUEE and to delay load the code so it will also work in SharePoint 2013.

The example below uses an Announcements list, but should work with any list as long as the view displays the "Title (linked to item with edit menu)" column.

How to get the ID of the web part…

The web part's ID has a name something like WebPartWPQ3. To find it:

  1. Use the browser's View, View Source or View Page Source option to display the HTML of the page
  2. Search for a slash followed by the name of the web part:  "/Announcements"
  3. Either read down from what you found looking for something like 'id="WebPartWPQ3"' (the number may be different)  Note: you are not looking for WebPartTitleWPQ3 or other similar names!
  4. Copy everything inside of the quotes, including any extra spaces or periods! Note that 2010 will include the list's name and the list's description while 2007 will only have the list's name.
      summary="Announcements Use this list to track upcoming events, status updates or other team news."

Steps:

  1. Create your Announcements list and add your announcements
  2. Add the announcement list’s web part to the page
  3. Find the name of the web part (see "How to get the ID of the web part" above)
  4. Create a Notepad file:
    1. Copy and paste the JavaScript code from below
    2. Edit the JavaScript to change the line with var LinkList = document.getElementById("WebPartWPQ5") and change "WebPartWPQ5" to your web part name found in step 3 above
    3. Customize the <marquee> tag to set any desired options (see: http://msdn.microsoft.com/en-us/library/aa259539(v=VS.60).aspx)
  5. Upload the Notepad file to a library ("Site Assets" is a good choice)
  6. Right-click the newly uploaded file and select Copy Shortcut (to get the URL to the file)
  7. Add a Content Editor Web Part (CEWP) to the page with the announcements web part, just under the announcements web part
  8. Modify the CEWP and
    1. set its title to whatever you like ("Site News!") (or set its Chrome to none to hide the title)
    2. paste the URL you copied in step 6 into the Content List box
    3. Click OK
  9. Save the page and test it!

Notes:

  • You can customize the <marquee> tag by changing its attributes or wrap it other HTML such as a DIV with a border or background.
  • <marquee> may not work in every browser, but will fall back to list a list of links if it is not supported.
  • There are four lines that start with "MyMarquee.innerHTML", but only one of them is not commented out ("//"). You can uncomment any one of these:
    • text only
    • text with hyperlinks
    • text with hyperlinks that open in a new window
    • text with hyperlinks that open in a SP 2010 style dialog box

 

The Code:

<!-- the MARQUEE tag for the items -->
<!-- customize as needed! –>
<marquee id="TTN_marquee" direction="up" height=48 scrollamount="1"></marquee>


<script type="text/javascript">
// CEWP trick from techtrainingnotes.blogspot.com! 
// http://techtrainingnotes.blogspot.com/2013/05/adding-scrolling-list-of-messages-to.html

// Change the web part name here!!! 
var TTNLinkListName = "WebPartWPQ3";



function TTNgetSPversion()
{  // returns 12 for 2007, 14 for 2010 and 15 for 2013
  var SPversion = "12"; 
  try { SPversion = SP.ClientSchemaVersions.currentVersion.substring(0,2) } 
  catch (e) {}
  return SPversion;
}

function TTNinEditMode()
{
    var editmode="";
    // test for wiki page mode
    try { editmode = document.getElementById("_wikiPageMode").value } 
    catch (e) {}
    if (editmode=="")
    {
      // test for web part page mode
      try { editmode=document.getElementById("MSOSPWebPartManager_DisplayModeName").value } 
      catch (e) {}
    }
    if (editmode=="Edit" || editmode=="Design")
      return true;
    else
      return false;
}

function TTNlist2marquee()
{
  var TTNLinkList = document.getElementById(TTNLinkListName);
  var spVersion = TTNgetSPversion();
  var editmode = TTNinEditMode();

  // hide the list, but only if not in edit mode
  if (TTNLinkList)
  {

    // are we in edit mode?
    var displaymode = "";
    if ( !editmode )
    {
       displaymode = "none";
    }

    // hide the list web part (based on SP version)
    if ( spVersion = 12 ) 
    {
      // 2007 code here
      TTNLinkList.parentNode.parentNode.parentNode.style.display=displaymode;
    }
    else
    {
      // 2010 and 2013 code here
      TTNLinkList.style.display=displaymode;
    }  

    
    //Copy all of the links from the list to the MARQUEE
    var MyMarquee = document.getElementById("TTN_marquee");

    var links = TTNLinkList.getElementsByTagName("A"); // find all of the links
    for ( i=0; i<links.length; i++ ) 
    {
      if (links[i].onfocus)
      {
        if (links[i].onfocus.toString().indexOf("OnLink(this)") > -1)
          { 
            // text only version of the marquee (no links)
            //MyMarquee.innerHTML += links[i].innerHTML + "<br>"; 

            // version with hyperlinks
            MyMarquee.innerHTML += "<a href='" + links[i].href + "'>" + links[i].innerHTML + "</a><br><br>";

            // open the link in a new window
            //MyMarquee.innerHTML += "<a href='" + links[i].href + "' target='newwin'>" + links[i].innerHTML + "</a><br><br>";

            // open the link in a SP 2010 dialog box
            //MyMarquee.innerHTML += "<a href='JavaScript:var options=SP.UI.$create_DialogOptions();options.url=\"" + links[i].href + "&IsDlg=1\";options.height = 400;void(SP.UI.ModalDialog.showModalDialog(options))'>" + links[i].innerHTML + "</a><br><br>";

          }
      }
    }
  }
  else
  {
    alert("Marquee list named '" + TTNLinkListName + "' not found");
  }

}

try {
  // for 2010 and 2013
  ExecuteOrDelayUntilScriptLoaded( TTNlist2marquee, "sp.js" );
}
catch (e) {
  // for 2007
  _spBodyOnLoadFunctionNames.push('TTNlist2marquee');
}

</script>
 
 
.

5/06/2013

So you want to be a SharePoint Developer…

 

In a recent class we started putting together a list of what you need to know to be a well rounded SharePoint developer. The list very quickly got out of hand… but everything in it is required to for some aspect of SharePoint development. You don't need to know all of this if you are focusing on just a part of SharePoint, but not knowing these technologies may result in reinventing the wheel or the creation of things in SharePoint that don't feel like they belong there.

Some of the technologies you will need to know:

  • General web technologies
    • HTML
    • HTML5 (starting with SP 2013)
    • Cascading Style Sheets (CSS)
    • DHTML and working with the DOM
    • XML and XSLT (added by JR!)
    • JavaScript and jQuery
    • Browsers and browser limitations (and how to code around them)
    • web security
  • Microsoft web and development technologies
    • ASP.Net (pretty much everything!)
    • C# and / or Visual Basic .Net
    • AJAX
    • Silverlight (for SP 2010)
    • LINQ
    • ASP.Net 2.0 web parts
    • ASP User Controls
    • Visual Studio
  • General development skills
    • Object oriented development
    • Event driven development
    • Project management
  • SQL Server and SQL querying
  • Web Services in their various flavors
    • .Net 2.0 style SOAP web services
    • Microsoft WCF
    • RESTful services
  • Workflow
    • .NET 3.5 workflow and for 2013, .NET 4.0 workflow
    • Visual Studio workflow development
    • SharePoint Designer declarative workflow development
  • SharePoint
    • End user and site owner skills
    • SharePoint site security
    • SharePoint code related security
    • Event receivers
    • CAML XML and everything it is used with
      • site templates
      • list templates
      • features
      • content types
      • views
      • and much more
    • SharePoint editions and licensing
    • The SharePoint object model and API
    • The SharePoint Client Side Object Model (CSOM)
    • The SharePoint web services
    • The SharePoint architecture
    • SharePoint code deployment options
    • SharePoint web parts
      • connected web parts
      • web part properties panels
    • SharePoint services (knowing what's there and creating new services)
    • Metadata and the metadata API
    • External data connectivity (BCS)
    • Search
      • The Search API
      • iFilter development
  • And for SharePoint 2013
    • SharePoint "app" development
    • writing Azure hosted applications
  • InfoPath
    • General forms development
    • Customizing SharePoint list forms
    • Creating and integrating workflow forms
  • Best practices
    • Web
    • SharePoint
    • JavaScript
    • SQL
    • Web services
    • Documentation
    • Project management
    • Performance testing
    • Testing and deployment
    • Your organization's best practices and SharePoint Governance Plans
  • Tools and resources
  • Also very useful…
    • Microsoft Office development skills
    • PowerShell
    • Visio
    • Mobile Web App Design

Did I miss anything? Post a comment and I will add it to the list.

 

SharePoint Training

As I am a Microsoft Certified Trainer (MCT)I would be remiss if I did not list some of the training resources available through MAX Technical Training! If it's about SharePoint and SharePoint development, MAX has it!

 

SharePoint Certification

These classes are aligned with the Microsoft certifications for SharePoint development:

4/14/2013

SharePoint Cincy 2013 is this week!

 

Don't forget… SharePoint Cincy 2013 is coming soon! April 19th (That's this Friday!)

Third Annual SharePoint Cincy Event!

Register NOW!  http://www.sharepointcincy.com/

 

SP-speaker-image

I've been asked to bring back my SharePoint Governance presentation, "SharePoint Governance… It May Not Be What You Think It Is…". I've updated it to include SharePoint 2013 and Office 365. Governance was a big topic, its gotten bigger! (and still only an hour allotted!)

 

Choose From Multiple Tracks:

This conference promises to have something for every level of your organization and every IT professional who has an interest in SharePoint. Here's this years tracks:

  • Driving Business Value with SharePoint
  • Application Development in SharePoint
  • SharePoint Implementation and Administration
  • Business Intelligence and Data Management
  • Site Owners, Content Managers & Power Users
  • Bonus Track: Exploring What's New With SharePoint 2013

 

The tracks:

Track 1: Driving Business Value With SharePoint

Subject: Converting an Email Culture into a SharePoint Culture
Presenter: Robert Bogue – President, Thor Projects, LLC and SharePoint MVP
 
Subject: SharePoint: Driving Business Value Through Data Centralization
Presenter: Adam Solzmon – PCMS Datafit, SharePoint Practice Leader

Subject: How to Manage Business 'Transformation' Using SharePoint as the Engine
Presenter: Rich Kurz – Ascendum, General Manager, Solutions


Track 2: Application Development in SharePoint

Subject:  Updating Your Developer’s Skill Set for the New App Model
Presenter: Sean McDonough – Bitstream Foundry - Owner
 
Subject: F5 Tornado – A Whirlwind Introduction to SharePoint 2010 Development
Presenter: Patrick Tucker – Strategic Data Solutions, Principal Consultant SharePoint

Subject: Unleashing the Power of the Content Query Web Part
Presenter: Peter Serzo – High Monkey Consulting, SharePoint Practice Architect

Subject: Claims Based Authentication and SharePoint
Presenter: Justin Kobel – KiZAN Technologies, Principal SharePoint Consultant
 

Track 3: SharePoint Implementation and Administration

Subject: SharePoint 2013 Administration
Presenter: Tom Resing - SharePoint911/Rackspace, Consultant SharePoint MVP

Subject: Managed Metadata A to Z – Plan, Implement, Make it a Success!
Presenters: Stacy Deere-Strole – Focal Point Solutions, CEO, Stephanie Donohue – Focal Point Solutions, SharePoint Solutions Architect
 
Subject:Advanced SharePoint Troubleshooting
Presenter: Clint Richardson – Applied Information Sciences, Infrastructure Consultant

Subject: Integrating SharePoint with Office Web Apps (WAC) Server
Presenter: Brian Jackett – Microsoft, Premier Field Engineer - SharePoint


Track 4: Business Intelligence and Data Management

Subject: SharePoint BI – A Parable of Choices and Choosing Wisely
Presenter: Peter Serzo – High Monkey Consulting, SharePoint Practice Architect
 
Subject: Managing Your Business With Dashboards and Disparate Sources
Presenter: Chris Murphy – Ascendum, SharePoint/BI Solutions Delivery Manager

Subject: Integrate External Data with Business Connectivity Services
Presenter: Tom Resing - Rackspace, SharePoint MCM and MVP

Subject: Now I Have SharePoint. Where's the BI?
Presenters: Jim Klosterman – PCMS Datafit, Senior Consultant, Harold Loyd – PCMS Datafit, Senior Consultant


Track 5: Site Owners, Content Managers, & Power Users

Subject: The Secret Sauce for Building Sophisticated Applications as an End-User with SharePoint
Presenter: Bill Crider – Sogeti, Senior Manager

Subject: Lists: Used, Abused and Underappreciated
Presenter: Wes Preston–TrecStone, LLC, Owner/Principal Consultant and SharePoint MVP
 
Subject: Branding In SharePoint 2013
Presenters: Matthew Tallman – Cardinal Solutions, Principal Consultant David M. Ginn – Cardinal Solutions, Principal Consultant

Subject: ECM on SharePoint - 13 Ways to Make it Rock!
Presenter: Jeremy Minich – KnowledgeLake, Systems Engineer
 

Bonus Track: Exploring What's New With SharePoint 2013

Subject: Where is SharePoint Headed and Why Should You Care? (a panel discussion)
Potential Panelists: Sean McDonough, Wes Preston, Shane Young...
 
Subject: Build Your SharePoint 2013 Lab in the Cloud with Azure… for FREE!
Presenter: Keith Mayer – Microsoft, Senior Technical Evangelist

Subject: Re-Introduction to Workflow
Presenter: Robert Bogue – President, Thor Projects, LLC and SharePoint MVP
 
Subject: Combining your BI collateral with PerformancePoint Services - A Working Session
Presenter: Tavis Lovell – SharePoint 911/Rackspace, Senior SharePoint Consultant


 

Who should attend?

  • Application/Software Developers
  • Information Architects
  • SharePoint Administrators
  • IT Business Leaders
  • Knowledge Workers
  • IT Professionals

3/22/2013

SharePoint: Change the Default for "Use my local drafts folder"

 

If you don't know what the "local drafts folder" is, then read this first: http://techtrainingnotes.blogspot.com/2012/12/sharepoint-use-my-local-drafts-folder.html

In SharePoint 2007 the "Use my local drafts folder" checkbox was checked by default. In SharePoint 2010 and 2013 it is not checked by default. Turns out that this is an Office default and not a SharePoint default and can be changed from the Options screen of Word or Excel. (I think there is also a way to change the default using JavaScript from the master page, but so far I'm missing some obvious step…)

[image%255B16%255D.png]

Steps for Office 2007, 2010 and 2013

Each user can set their preference by going to an Office application such as Word, Excel, PowerPoint or Outlook and:
- Click the Office Button
- Click Options (Word Options in 2007)
- Set "Save checked-out files to" to "The server drafts location on this computer"
- Click Save

With this option:

image

you get:

image

 

And with this option:

image
Note: the "Server drafts location" option is used when the "The server drafts location on this computer" option is selected. (Looks backwards!)

you get:

image

References:

http://office.microsoft.com/en-us/powerpoint-help/change-where-you-work-on-files-that-you-check-out-from-a-sharepoint-library-HA010208583.aspx

 

Notes:

  • This setting is stored in the registry and could be set using Group Policy
    HKEY_CURRENT_USER\Software\Microsoft\Office\Common\Offline\Options\UseLocalDrafts
  • There have been reported issues when the drafts folder path points to a network share, at least in Office 2007.
  • Every day I learn something new about this thing called SharePoint that I should have known a long time ago…


.

3/17/2013

Freezing the Title Row of a SharePoint 2010 List or Library

 

SharePoint 2010 lists and libraries do not have scrollbars. The pages do, but when you scroll down a long list you will find that the column headings scroll off of the top of the page. The little project below is a quick and dirty little project to add scrollbars to a list and lock the column titles in place.

Before scrolling: (click the image for a larger version)

image

After scrolling (headings have scrolled off of the top):

image

After the fix below:

image

Bonus! Notice that not only are the column headings always displayed, but so is the "Add new item link" at the bottom!

Before you continue…

  • This is a work in progress and presented as starting point for your own experiments!
  • This has only been tested in SharePoint 2010
  • It can be made to work with 2013, but there's a few extra steps that I'll need to document
  • This works with View pages… it needs more work before being used with views displayed in web parts
  • There's some excess white space at the top of the list.
  • This does not work with the following view options (and probably a few more):
    • Grouping
    • The Content Editor Web Part as adding it breaks the default view selection behavior (You must use SharePoint Designer)
  • There is a flaw with FireFox and possibly other browsers:
    • The heading row may be listed twice

 

If you are OK with the above, then give it a try!

Steps:

  1. If you don't want to customize the default "All Items" (allitems.aspx) view then create a new Standard view
  2. You may want to customize your view and set the item limit to a number larger than the default of 30. Do not exceed 5000. (A SharePoint restriction)
  3. Open the site in SharePoint Designer
  4. Click Lists and Libraries and click your list
  5. Click the view you want to customize
  6. Click the Advanced Mode button in the Home tab of the ribbon
  7. In the Code pane scroll down and find "</WebPartPages:WebPartZone>" – you will add your code between that tag and the "</asp:Content>" tag
  8. Copy the code from below and paste between the two tags listed above
  9. Edit the following line and replace Bikes with the name of your list
        var SummaryName = "Bikes "
     
    Note: View your list page, use the browser's View Source feature and search for "summary=". Copy what follows including any spaces. If your list is named Bikes and has no description defined then you will find "Bikes ".  (note the space at the end) If your list has a description then you may find something like "Bikes This is a list of bikes for sale."  (note the exact use of spaces and the possible presence of a period or other punctuation)

    Another example: The default Shared Documents library has this summary name: "Shared Documents Share a document with the team by adding it to this document library."
     
  10. In the <style> section adjust the height of the scrolling area of your list – you may need some trail and error here
    #TTNlist
    {
      height:200px;
      overflow-y:scroll !important;
      overflow-x     :auto
    }
  11. Save your changes and test your view

If it does not work:

Check your SummaryName! It has to be exactly what's found in the view page's HTML.

Try a delayed run of the script…

  Comment out this line by adding two slashes at the beginning:
    //or call the function immediately
    TTNListScroll();         <—this line

  And uncomment the spBodyOnLoadFunctionNames line:
    // update the list after the page has loaded
    //_spBodyOnLoadFunctionNames.push("TTNListScroll");

 

 

The code:

<script>
 
function TTNListScroll()
{
  // Scrolling list code from TechTrainingNotes.blogspot.com
  // Edit the next line with your list's summary name
  var SummaryName = "Bikes 2 ";
 
  var TTNmyTable;    
  var TTNListDiv = document.createElement('div'); 
  var TTNHeadingDiv = document.createElement('div');
 
  var tables = document.getElementsByTagName("TABLE");
  for (var i=0;i<tables.length;i++)
  {
    if ( tables[i].summary == SummaryName )
    {
      TTNmyTable = tables[i];
      break;
    }
  }
 
  if(TTNmyTable == undefined)
  {  
    //
    // Table not found!
    // you may want to comment out the next line after testing
       alert("table '" + SummaryName + "' not found");
    //
    return;
  }
 
  // make a copy of the table for the heading area
  TTNHeadingDiv.appendChild(TTNmyTable.cloneNode(true)); 
  TTNHeadingDiv.id="TTNheading";
  TTNListDiv.appendChild(TTNmyTable.cloneNode(true)); 
  TTNListDiv.id="TTNlist";
  TTNListDiv.width="100%";
 
  // udpate the page
  var TTNnode = TTNmyTable.parentNode
  TTNnode.replaceChild(TTNHeadingDiv, TTNmyTable);
  TTNnode.appendChild(TTNListDiv);
 
  // hide the heading row of the main list
  TTNListDiv.childNodes[0].rows[0].style.visibility='hidden';
  
  // make the DIV for the heading the same width as the main list
  TTNHeadingDiv.childNodes[0].style.width = TTNListDiv.childNodes[0].offsetWidth 
}
 
// update the list after the page has loaded
//_spBodyOnLoadFunctionNames.push("TTNListScroll"); 
 
//or call the function immediately
TTNListScroll();
 
</script>
 
<style type="text/css">
 
#TTNheading
{
  height:28px;
  overflow:hidden;
}
 
#TTNlist
{
  height:200px;
  overflow-y:scroll !important;
  overflow-x     :auto
}
 
</style>

 

 

.

Note to spammers!

Spammers, don't waste your time... all posts are moderated. If your comment includes unrelated links, is advertising, or just pure spam, it will never be seen.