Displaying Help as Web Forms or HTML

Creating your Help content as Web forms or HTML pages is probably the simplest approach to providing user assistance. The Help files can reside in either the same project folder as your Web application or in a subordinate folder.

You use hyperlinks or other controls to display the Help in the browser, just as you would any other page, with one important difference: you usually want to display Help in a new window or in a separate frame from the rest of the Web application, as shown in Figure 14-2.

WebForml - Microsoft Internet Explorer

WebForml - Microsoft Internet Explorer

File Edit View Favorites Tools Help

Forward 5top Refresh Home

Search

Favorites Media

History

Mail

Address ยก-.ttp : //localhost/mcsdwebapps/chapter 14/vbHelpWin5nippet/WebForm 1. aspx#

Show Help In a New window

Using in-line scripts:

Click here for help Click here for more help.

Using a script procedure:

Click here for help.

Click here for more help

Topic 1 - Microsoft i

This is a he topic.

Click here to close

Click here for more help

NLocal intr

Figure 14-2 Displaying a Help browser window

Displaying Help in a separate browser window preserves the user' s place in the Web application and allows him or her to compare the Help to the current task being performed.

To display Help in a separate window, use the client-side window object' s open method, as shown by the following hyperlink:

onclick="window.open('topic1.aspx', 'helpwin').focus()">Click here for help.</a>

The preceding HTML uses the onclick event to display the Help topic in a new browser window on top of the Web application' s window. Setting the href attribute to <;$QD> #<;$QD> simply links to the current location in the Web application, rather than directing the user to a new location. The first argument to the open method specifies the Help topic to display; the second argument names the new window so that subsequent Help topics are directed to the same window. Finally, the focus method ensures that the Help window is displayed on top of the Web application.

Other Help hyperlinks within the Web application can use the same onclick script to display different topics in the same window. If your application includes more than one Help hyperlink per Web form, it is a good idea to place the script in a procedure and call it from the onclick procedure, as shown here:

0 0

Post a comment

  • Receive news updates via email from this site