7.9.8.2 Creating drop-down hotspots with Mif2Go macros only
The following settings use three macros to handle open/close actions for dedicated drop-down paragraph format DropPara.
DropPara = CodeBefore CodeStart CodeAfter
; At the start of any of the following paragraphs,
; close any open drop-down blocks:
DropPara = <$DropDownBlockClose>
; List any other paragraphs that should end a drop-down block:
; Before the DropPara text, insert a drop-down link:
DropPara = <$DropDownLinkOpen>
DropPara = <$DropDownBlockOpen>
; At end of body, close any open drop-down blocks:
Bottom = <$DropDownBlockClose>
; Before DropPara text, set a new drop-down link:
href="javascript:doSection('drop<$$DropDownCount>');void 0;">
<img src="dropopen.gif" id="iodrop<$$DropDownCount>"
style="border:0;" alt="Click to open.">
<img src="dropclose.gif" id="icdrop<$$DropDownCount>"
style="display:none;border:0;" alt="Click to close.">
; After DropPara, insert javascript to open a new drop-down block,
; and set a flag to signify that the block is open. The javascript
; includes a counter to identify the drop-down section:
<div class="dropdown" id="drop<$$DropDownCount>" style="display:none;"
onclick="noSection('drop<$$DropDownCount>')">
<$$Flag_DropDownBlockOpen = 1>
; Before DropPara or H1 through H5 or </body>,
; check a flag to see if a drop-down block is open;
; if so, close the drop-down block and clear the flag:
<$_if ($$Flag_DropDownBlockOpen)>
<$$Flag_DropDownBlockOpen = 0>
; Put any macro definition sections before this section.
> 7 Producing on-line Help > 7.9 Including expandable sections in Help topics > 7.9.8 Emulating Web Works Publisher drop-down hotspots > 7.9.8.2 Creating drop-down hotspots with Mif2Go macros only