Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

7 Producing on-line Help > 7.9 Including expandable sections in Help topics > 7.9.7 Deploying JavaScript code for drop-down sections > 7.9.7.2 Locating JavaScript code for drop-down sections


7.9.7.2 Locating JavaScript code for drop-down sections

By default, for most output types Mif2Go inserts JavaScript code for drop-down sections in the <head> section of each HTML file that contains one or more drop-down sections. For OmniHelp, Mif2Go includes the JavaScript code in viewer files ohctrl.js and ohmain.js. For any output type, you can direct Mif2Go to reference the code in a separate JavaScript library instead.

To specify where the JavaScript code resides:

[DropDowns]

; DropJSLocation = Head (to insert the code in <script> tags),

; None (if the code is included elsewhere, as for OmniHelp),

;  or a filename to reference in a JS link in the <head>.

DropJSLocation = Head

When DropJSLocation=Head, Mif2Go places JavaScript code in the <head> section of each output HTML file that includes at least one drop-down section:

<script language="JavaScript" type="text/javascript">

<!--

<$DropJS>

//-->

</script>

Macro $DropJS is expanded when Mif2Go writes the output HTML file.

When DropJSLocation=None, Mif2Go assumes you are supplying a JavaScript library for which a reference already exists, possibly configured as part of a value for Head in the [Inserts] section. See §28.9.2 Invoking macros at predetermined points in output.

When DropJSLocation=filename, Mif2Go places the following reference in the <head> section:

<script language="JavaScript" type="text/javascript"

src="<$DropJSLocation>"></script>

Macro $DropJSLocation is expanded when Mif2Go writes the output HTML file. The file specification you provide for filename can include a path relative to the project directory. Although you can specify an absolute path, we advise against it. Also, a path that includes a drive specification will not work.



7 Producing on-line Help > 7.9 Including expandable sections in Help topics > 7.9.7 Deploying JavaScript code for drop-down sections > 7.9.7.2 Locating JavaScript code for drop-down sections