<div dir="ltr"><div><div><div><div><div><div>re: <a href="http://pmwiki.org/wiki/Cookbook/Toggle">http://pmwiki.org/wiki/Cookbook/Toggle</a><br><br>In the toggle.php recipe of 2014-02-21, we see the following:<br><br>$HTMLFooterFmt['toggle'] = "<script type=\"text/javascript\">document.getElementById(\"{$id}\").style.display = '{$style}';</script>";<br>

<br></div>This should create a simple string that is places into the HTMLFooterFmt hash with the index of "toggle."<br><br></div>How on earth is toggle supposed to function if there is more than one toggle present on the page?<br>

<br></div>Am I missing something in PHP/PmWiki that would allow this to work?<br><br></div>We don't see anything like this behavior in the older version from 2009-07-23<br><br></div>Perhaps not coincidentally, I have multiple toggles working with the version from 2009-07-23, but not with 2013-02-21<br>

<br></div>Unless I make the following change:<br><br>  $HTMLFooterFmt["toggle$id"] = "<script type=\"text/javascript\">document.getElementById(\"{$id}\").style.display = '{$style}';</script>";<br>

<div><div><div><div><div><div><div><br><br></div><div>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).<br>

</div><div><br clear="all"><div><div>-Michael Paulukonis<br><a href="http://www.xradiograph.com" target="_blank">http://www.xradiograph.com</a><br><a href="http://goog_2112721603" target="_blank"></a><a href="http://www.xradiograph.com%5Cinterference" target="_blank">Interference Patterns (a blog)</a><br>

<a href="https://twitter.com/XraysMonaLisa" target="_blank">@XraysMonaLisa</a><br><a href="http://michaelpaulukonis.com" target="_blank">http://michaelpaulukonis.com</a><br><a href="http://www.BestAndroidResources.com" target="_blank"></a><br>

<br>Sent from somewhere in the Cloud<br>(hearthrug, by the fender)<br></div>
</div></div></div></div></div></div></div></div></div>