[pmwiki-users] toggle.php and HTMLFooterFmt question

michael paulukonis xraysmalevich at gmail.com
Tue Jul 1 11:18:10 CDT 2014

re: http://pmwiki.org/wiki/Cookbook/Toggle

In the toggle.php recipe of 2014-02-21, we see the following:

$HTMLFooterFmt['toggle'] = "<script
type=\"text/javascript\">document.getElementById(\"{$id}\").style.display =

This should create a simple string that is places into the HTMLFooterFmt
hash with the index of "toggle."

How on earth is toggle supposed to function if there is more than one
toggle present on the page?

Am I missing something in PHP/PmWiki that would allow this to work?

We don't see anything like this behavior in the older version from

Perhaps not coincidentally, I have multiple toggles working with the
version from 2009-07-23, but not with 2013-02-21

Unless I make the following change:

  $HTMLFooterFmt["toggle$id"] = "<script
type=\"text/javascript\">document.getElementById(\"{$id}\").style.display =

I do understand there were changes made between 2009 and 2014 (I'm slow in
updating) to handle nested divs, but I'm failing to see how that's
applicable, here (my targets are nested, for one thing).

-Michael Paulukonis
<http://goog_2112721603>Interference Patterns (a blog)
@XraysMonaLisa <https://twitter.com/XraysMonaLisa>

Sent from somewhere in the Cloud
(hearthrug, by the fender)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20140701/68cce026/attachment.html>

More information about the pmwiki-users mailing list