14.4. Beyond the WPSC

The Web Part Page Services Component provides a powerful and convenient framework for you to use when creating client-side scripts. But it is not the only way to interact with SharePoint from the browser client. This section gives you a few ideas for further exploration.

14.4.1. Accessing Page Components via the DOM

Earlier in the chapter, you saw how to use the DOMObject property of the WebPartPage to hide and redisplay the contents of a page. This object is actually a direct link to the document browser object. That means you have access to any component within the page for your scripts. Similarly, the DOMObject property of a Part object gives you a handle into that Web Part's displayed components.

While this is great, you also saw that some Web Parts, like List and Library Views, may not be exposed directly. To manipulate these — dynamically changing the contents in the dropdown of a choice field, for instance — you have no choice but to view the source of the web page and determine the id values of the controls you want to change. With that information, you can access those objects directly at run time, and override SharePoint's default behavior.

14.4.2. Other Client-Side Objects

SharePoint offers access to several client-side ActiveX controls that can provide enhanced functionality. Generally, you can assume that these controls require Internet Explorer 5.5 or higher, and most are only installed with versions of Microsoft Office. The exact version ...

Get Professional Microsoft® SharePoint® Designer 2007 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.