| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <html> |
| <head> |
| <meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." > |
| <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
| <meta http-equiv="Content-Style-Type" content="text/css"> |
| <link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css"> |
| <script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script> |
| <title>Invoking the action from HTML</title> |
| </head> |
| <body> |
| |
| <h2>Invoking the action from HTML</h2> |
| |
| <P> |
| To include active help links in your documentation, you must first declare the |
| use of the supporting JavaScript code. The live help JavaScript is located in the <b>org.eclipse.help</b> |
| plug-in. You refer to it using the help system's <a href="ua_help_content_files.htm#help_plugin_files_xref">cross |
| plug-in referencing</a> technique. This script reference should be placed in the <b>HEAD</b> section of your HTML: |
| </P> |
| |
| <pre ><script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js> </script></pre> |
| |
| <P > |
| In the body of your documentation, you invoke the liveAction script. </P> |
| |
| |
| <pre ><a href='javascript:liveAction( |
| "org.eclipse.platform.doc.isv", |
| "org.eclipse.platform.doc.isv.activeHelp.ActiveHelpOpenDialogAction", |
| "")'>Click here for a Message.</a></pre> |
| |
| |
| <P >The parameters for <b>liveAction </b> are </P> |
| |
| |
| <ul> |
| <li> the ID of the plug-in that |
| contains the action</li> |
| <li>the name of the class that implements the action</li> |
| <li>the String that will be passed to the live help action using <b>setInitializationString</b>. |
| We don't need to pass any information from the HTML page, so we just |
| pass an empty string.</li> |
| </ul> |
| |
| </body> |
| </html> |