Home > Basic Functions > Context-sensitive Help > Web Applications > Web F1 Field Help

Web F1 Field Help

You can add context sensitive help to any field within your Web application so that when a user presses the F1 key while a field has the focus, a help topic specific to that field is displayed. Follow the steps below to add F1 context sensitivity to fields within your Web application.

1. Open a page (such as a login form) of your web application using an HTML editor such as Visual Studio or a text editor such as Windows Notepad. This is an example of a simple login form.

<html><body>
<br><br>
Username: <input><br>
Password: <input><br><br>
<input type=button value=Login>
</body></html>



2. Add the following code to capture the F1 key and display help for the specific field.

Open a Dynamic Help Page (page only, no contents)

<html><body>
<br><br>
Username: <input onhelp="window.open('http://www.domain.com/help/page.aspx?pageid=username', '_blank');return false;"><br>
Password: <input onhelp="window.open('http://www.domain.com/help/page.aspx?pageid=password', '_blank');return false;"><br><br>
<input type=button value=Login>
</body></html>


Open a Dynamic Help Page   (within help system)

<html><body>
<br><br>
Username: <input onhelp="window.open('http://www.domain.com/help/default.aspx?pageid=username', '_blank');return false;"><br>
Password: <input onhelp="window.open('http://www.domain.com/help/default.aspx?pageid=password', '_blank');return false;">
<br><br>
<input type=button value=Login>
</body></html>


Open a Static Help Page

<html><body>
<br><br>
Username: <input onhelp="window.open('help/username.htm', '_blank');return false;"><br>
Password: <input onhelp="window.open('help/password.htm', '_blank');return false;"><br><br>
<input type=button value=Login>
</body></html>

* the url above assumes that the static help system is in a sub folder named 'help'


Open a Static Help Page   (with help system)

<html><body>
<br><br>
Username: <input onhelp="window.open('help/default.htm?username.htm', '_blank')"><br>
Password: <input onhelp="window.open('help/default.htm?password.htm', '_blank')"><br><br>
<input type=button value=Login>
</body></html>

* the url above assumes that the static help system is in a sub folder named 'help'



3. Open the html file in your browser. Press F1 to display the help system in a new window.




 

See also