FrontPage Options for Advanced Developers
Using the Microsoft Script Editor, HTML View, and the HTML Tools toolbar to help control complex pages

Introduction

Microsoft® FrontPage® web site creation and management tool is well-known as a tool that anyone can use to develop Web pages quickly. And for the very reason that anyone can use it, advanced Web developers often presume that FrontPage has not been designed with their more sophisticated needs in mind. Yet nothing could be farther from the truth: FrontPage contains a wealth of powerful features that are designed precisely to support the needs of the most sophisticated of Web authors. 

Several features help advanced Web developers develop and refine the most complex of Web pages: the Microsoft Script Editor, for instance, and the HTML View mode. Additionally, FrontPage provides a downloadable HTML Tools toolbar, which provides additional levels of detail for making changes to your code while working in Page View (i.e. Normal View).

For advanced developers, particularly developers whose pages use scripts developed with Visual Basic® development system for Applications or Java, these sophisticated features enable you to do all your work with one tool. You can write and debug scripts right from within FrontPage, manipulate HTML code at a very granular level, and test the pages right in the same interface.

Microsoft Script Editor
The Microsoft Script Editor is both one of the most powerful tools and one of the best-kept secrets of FrontPage. Accessible through the Tools/Macro/ pull down menu (or by pressing Alt+Shift+F11), the Microsoft Script Editor is designed specifically to support Visual Basic and Javascript authoring. 

"It's basically Visual InterDev® web development system inside FrontPage," says Ben Canning, a program manager in the Microsoft Office group, "It provides a script developer with many of the features you'd find in Visual InterDev. It provides features such as statement completion and script debugging, and these make it very easy to develop rich scripts quickly and efficiently."

"The Microsoft Script Editor is a powerful time-saver," adds Joseph Khalaf, a Microsoft Support Engineer. "It saves a lot of time by cutting back on errors right from the start. If you're typing a script in Notepad and you misspell something-say you type 'document.wite' instead of 'document.write'-the script just won't run. If you've got 1,000 lines of code you might lose 15 or 20 minutes trying to figure out where the problem is. If you're doing this in the Microsoft Script Editor, as soon as you type 'document' followed by the dot, Microsoft IntelliSense® technology kicks in and shows you the list of properties or methods that are available for 'document,' and all you have to do is click the one you want." 

The Microsoft Script Editor also provides powerful testing and debugging tools, so you can step through your scripts or insert breakpoints in the code to discover just where problems exist. In addition, some developers also want more control of their editing environment, and to have the ability to manipulate the tools palettes and project explorer palette. The new Microsoft Script Editor allows you to hide those palettes if you want to so that you can maximize your screen space. If, however, you want a particular palette always visible, you just click on the tack to lock it in place.

A Powerful Fix for Script Junkies
"If you're a script junkie, the Microsoft Script Editor makes it easier and faster for you to complete your work more accurately," says Ed Chavez, a Web page designer and intranet manager who works for a Silicon Valley-based online financial services company. Chavez ought to know: after years of working with a wide range of Web development tools-Chavez chooses to do his development in FrontPage. And his work is anything but amateurish: Chavez used FrontPage to build a departmental intranet serving more than 40 people. "It was initially used to facilitate communications among team members," Chavez explains. "It provided a repository of meeting minutes, updated news about the company, department, surveys and the like. The content is all database driven and, best of all, people in the department could publish content to the site without knowing anything about HTML."

Using FrontPage and the Microsoft Script Editor, Chavez created this user-oriented intranet in less than 30 days. The site was so successful that Chavez was asked to expand the site to support all the departments across the corporation-and the same tools enabled him to complete that job single-handedly in just under a month.

"It was all done very quickly," Chavez says, "but it wasn't because I'm some kind of wizard. It was all FrontPage and the Script Editor. That was the key to getting it done." 

HTML View
The FrontPage HTML View feature (accessible by clicking the HTML tab at the bottom of the open window in View mode) is another feature of FrontPage that provides a deeper level of control for advanced developers. The HTML View interface goes where no WYSIWYG interface wants to go-directly into the HTML code that comprises the page. 
"Advanced users want a much finer level of control over layout," notes Microsoft's Canning, who prior to his position with the Microsoft Office product team was a test manager for Microsoft FrontPage. "Advanced authors want to use divs and spans; they'll care about using a particular table layout. In its WYSIWYG mode, FrontPage hides all that level of detail, and sometimes it's hard to get the level of control you want. With HTML View, you have access to all that detail. You can access a whole range of HTML tags that are purely structural and that really don't have a UI representation."

With HTML View, FrontPage offers an editing interface that works just like an HTML-oriented text editor. You can insert HTML directly into the page and manipulate it as much as you desire. You can also set the HTML View preferences in FrontPage to format your HTML code in precisely the manner you prefer, with HTML tags in particular colors, specific indents, and so on. You can even open a page that is formatted just the way you want and have FrontPage copy that formatting style for default use in other HTML Views.

HTML View also provides easy access to tag and attribute property sheets and dialog boxes. If you place your insertion point within a tag, you can right click and see the tag's properties in a pop-up dialog box; you can change a property in the dialog box and the change is incorporated right into the HTML code.

HTML TOOLS

Microsoft offers a downloadable toolbar that facilitates control of complex pages while working in Normal Page View. Available at: http://office.microsoft.com/downloads/2002/fphtml.aspx, the HTML Tools toolbar displays the hierarchy of tags surrounding the location on the screen where the insertion point is sitting. 

"The HTML Tools toolbar provides the ability to manipulate HTML tags without having to switch to HTML view," says Microsoft's Khalaf. "If you've got a page with multiple embedded tables, for instance, trying to figure out what's what by looking at the HTML is very difficult, no matter how much of a pro you are. With the HTML Tools menu, you can work with the HTML while in a WYSIWYG mode. You just click on a cell and the toolbar shows you the HTML tags embedding the cell where your cursor is sitting."

Additionally, once you see the tags in the toolbar, you can click on a tag, which selects the region on the screen controlled by that tag. If your insertion point is inside a table, you could click on the <tr> tag to select just the table row containing the insertion point. 

Four buttons on the HTML Tools toolbar provide still more functionality for advanced users. By clicking one button, you can insert additional HTML at the insertion point. Click another button and you can edit the tag surrounding the insertion point. Click another and you can wrap the selected region in another pair of tags. A fourth button enables you to delete the selected tag.

GEARED FOR THE ADVANCED USER

If Microsoft FrontPage has a reputation as a tool that can help anyone develop Web pages quickly, its Microsoft Script Editor and HTML View features, along with the HTML Tools menu, make it clear that it is a tool designed for advanced developers. These are features developed with the most sophisticated users in mind, features designed to provide the utmost control while still providing a development environment that is easy to use. 

More Resources 

 

©2001  Microsoft Corporation.  All rights reserved. Terms of Use


Microsoft, FrontPage, IntelliSense, Visual Basic, and Visual InterDev are either registered trademarks or trademarks of Microsoft Corporation in the United States and or other countries. The names of actual companies and products mentioned herein may be the trademarks of their respective owners.