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.4 Inspecting the JavaScript code for drop-down sections


7.9.7.4 Inspecting the JavaScript code for drop-down sections

The JavaScript functions included in macro $DropJS differ according to whether UseCompositeDropJS=Yes or No; and if No, according to the link type.

In this section:

§7.9.7.4.1 JavaScript code when UseCompositeDropJS=Yes

§7.9.7.4.2 JavaScript code when DropLinkType=Icon

§7.9.7.4.3 JavaScript code when DropLinkType=Button

§7.9.7.4.4 JavaScript code when DropLinkType=Text

See also:

§7.9.4.1 Specifying the type of link for drop-down sections.

7.9.7.4.1 JavaScript code when UseCompositeDropJS=Yes

[DropJS]

function doSection(id){

var but = document.getElementById("bu" + id)

var imop = document.getElementById("io" + id)

var imcl = document.getElementById("ic" + id)

var idiv = document.getElementById(id)

if (idiv.style.display=="none") {

idiv.style.display=""

    if (but != null)

        but.innerHTML="<$DropButtonCloseLabel>"

    if (imop != null)

        imop.style.display="none"

    if (imcl != null)

        imcl.style.display=""

} else {

idiv.style.display="none"

    if (but != null)

        but.innerHTML="<$DropButtonOpenLabel>"

    if (imop != null)

        imop.style.display=""

    if (imcl != null)

        imcl.style.display="none"

}

return false;

}

function noSection(id){

var but = document.getElementById("bu" + id)

var imop = document.getElementById("io" + id)

var imcl = document.getElementById("ic" + id)

var idiv = document.getElementById(id)

if (idiv.style.display=="") {

idiv.style.display="none"

    if (but != null)

        but.innerHTML="<$DropButtonOpenLabel>"

    if (imop != null)

        imop.style.display=""

    if (imcl != null)

        imcl.style.display="none"

}

}

7.9.7.4.2 JavaScript code when DropLinkType=Icon

[DropJS]

function doSection(id){

var imop = document.getElementById("io" + id)

var imcl = document.getElementById("ic" + id)

var idiv = document.getElementById(id)

if (idiv.style.display=="none") {

  idiv.style.display=""

  imop.style.display="none"

imcl.style.display=""

} else {

  idiv.style.display="none"

  imop.style.display=""

imcl.style.display="none"

}

return false;

}

function noSection(id){

var imop = document.getElementById("io" + id)

var imcl = document.getElementById("ic" + id)

var idiv = document.getElementById(id)

if (idiv.style.display=="") {

  idiv.style.display="none"

  imop.style.display=""

imcl.style.display="none"

}

}

7.9.7.4.3 JavaScript code when DropLinkType=Button

[DropJS]

function doSection(id){

var but = document.getElementById("bu" + id)

var idiv = document.getElementById(id)

if (idiv.style.display=="none") {

idiv.style.display=""

    but.innerHTML="<$DropButtonCloseLabel>"

} else {

idiv.style.display="none"

    but.innerHTML="<$DropButtonOpenLabel>"

}

return false;

}

function noSection(id){

var but = document.getElementById("bu" + id)

var idiv = document.getElementById(id)

if (idiv.style.display=="") {

idiv.style.display="none"

    but.innerHTML="<$DropButtonOpenLabel>"

}

}

7.9.7.4.4 JavaScript code when DropLinkType=Text

[DropJS]

function doSection(id){

var idiv = document.getElementById(id)

if (idiv.style.display=="none") {

idiv.style.display=""

} else {

idiv.style.display="none"

}

return false;

}

function noSection(id){

var idiv = document.getElementById(id)

if (idiv.style.display=="") {

idiv.style.display="none"

}

}



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.4 Inspecting the JavaScript code for drop-down sections