Datasheet
20
Part I: The Basics
Microsoft Script Editor is essentially a lightweight IDE based on an older version of the Microsoft Visual
Studio development environment. It was included and integrated with FrontPage for many versions,
and is now carried through to SharePoint Designer.
Access the Script Editor by selecting Tools Macro Microsoft Script Editor or via the icon on the Code
view toolbar. It is considered an optional component of SharePoint Designer, so upon first invocation
you may see Setup run to install it.
The Script Editor starts with the current page from SharePoint Designer open in its HTML (code) view.
A link is maintained between the two environments, so any change you make in the Script Editor is
transferred to SharePoint Designer, and vice versa.
In the Script Editor, press F5 to launch Internet Explorer with the current state of your page, without first
saving it. You can set breakpoints, debug variables, and do many of the other things you can do in other
development environments.
Selecting which browser to use for preview in the Script Editor is independent of the configuration of the
main SharePoint Designer application. To make multiple browsers available, you need to configure each
via File Browse With. The browser you set as the default is the one that F5 launches.
About the Script Editor
One reason the Script Editor is an optional component is that SharePoint Designer is
focused toward editing SharePoint sites, and the editor does not work effectively on
live SharePoint Web Part Pages. It remains extremely useful, however, for debugging
client-side scripts before inserting them into a SharePoint page (chapter 13 provides
some tips to this effect, as well as workarounds for Web Part Pages), and for working
on non-SharePoint sites.
The online help for the Script Editor contains very useful references for JavaScript and
VBScript languages.
Finally, the script editor can be used as the editing environment for InfoPath forms.
Split View
The Split view of the Page Editor provides all of the advantages of both Design and Code view. Each half
of the view behaves exactly like its dedicated view. Code view, for example, gives you IntelliSense, while
Design view maintains rulers and any page sizes you have set. In Figure 1 - 23 a table row has been
selected from the Quick Tag Selector. Notice the highlighting in both the Code and Design panes of the
Split view.
c01.indd 20c01.indd 20 11/20/08 1:16:22 AM11/20/08 1:16:22 AM