O'Reilly logo

Microsoft® SharePoint® Designer 2010 Unleashed by Kathy Hughes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding Code or JavaScript to the CEWP

Just like adding CSS styles to a CEWP, you can also add JavaScript to a CEWP. For example, in Figure 6.23, I added a snow effect to the home page of a site for the festive season using a CEWP that includes some JavaScript. Fellow SharePoint colleague and MVP, Todd Bleeker of Mindsharp, created the Web part in 2005, and it proved a popular download. The Web part still works in SharePoint 2010 sites. You can download it from http://www.mindsharpblogs.com/todd/archive/2006/12/20/1431.html.

Figure 6.23 Festive addition to a page using the CEWP and JavaScript.

image

Resource Site

You can find the snow.dwp file and snowflake ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required