295Chapter 16 .Window and Frame Objects onHelp NN2 (Web hosting ratings)

295Chapter 16 .Window and Frame Objects onHelp NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility . The generic onHelpevent handler is discussed in Chapter 15, but it also fires when the user activates the context-sensitive help within a modal or modeless dialog box. In the latter case, a user can click the Help icon in the dialog box s title bar, at which time the cursor changes to a question mark. The user can then click on any element in the window. At that second click, the onHelp event handler fires, and the event object contains information about the element clicked (the event.srcElement is a reference to the specific element), allowing a script to supply help about that element. To prevent the brower s built-in help window from appearing, the event handler must evaluate to return false(IE4+) or set the event.returnValueproperty to false (IE5). Example The following script fragment can be embedded in the IE5-only modeless dialog box code in Listing 16-44 to provide context-sensitive help within the dialog box. Help messages for only two of the form elements are shown here, but in a real application you add messages for the rest. function showHelp() { switch (event.srcElement.name) { case bgColor :
Go visit our java server pages services for a reliable, lowcost webhost to satisfy all your needs.

Leave a Reply