<div dir="ltr"><div>I think you're agreeing with me.<br><br>Which means that the 2014-02-21 needs to be patched.<br></div><br></div><div class="gmail_extra"><br clear="all"><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>
<br><br><div class="gmail_quote">On Thu, Jul 3, 2014 at 3:55 PM, Criss Ittermann <span dir="ltr"><<a href="mailto:crisses@kinhost.org" target="_blank">crisses@kinhost.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div style="word-wrap:break-word"><div><br></div><div><div class=""><div>On Jul 1, 2014, at 12:18 PM, michael paulukonis <<a href="mailto:xraysmalevich@gmail.com" target="_blank">xraysmalevich@gmail.com</a>> wrote:</div>

<br><blockquote type="cite"><div dir="ltr"><div><div><div><div><div><div>re: <a href="http://pmwiki.org/wiki/Cookbook/Toggle" target="_blank">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?</div>

</div></div></div></div></blockquote><div><br></div></div>If you have more than one toggle, make sure they all have a different id. :)</div><div><br></div><div>I've used this recipe several times, and I love it.  It works very well.  When I used it with (:panelist:) for quizzes, I made sure to use a variable from the page (say $Name) as the index.</div>

<div><br></div><div>Example of a quiz at work, entirely PmWiki driven -- each quiz's info is stored in data pages elsewhere on the site, they have categories and are pulled into various pages of the website...  <a href="http://bte18.com/Main/GolfingBasics" target="_blank">http://bte18.com/Main/GolfingBasics</a>  So you can see the different calls to the toggle javascript code on the HTML end here.<div class="">

<br><br><blockquote type="cite"><div dir="ltr"><div><div><div><div>Am I missing something in PHP/PmWiki that would allow this to work?</div></div></div></div></div></blockquote></div><div dir="ltr"><div><div><div><br></div>

</div></div><div>It's a combo of PmWiki and Javascript at work here.  :)</div><div><br></div></div><div class=""><blockquote type="cite"><div dir="ltr"><div><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>";</div>

</blockquote><br></div></div><div>Try the same line in the toggle.php I got from the cookbook (years ago):</div><div>$HTMLFooterFmt[] = "<script type=\"text/javascript\">document.getElementById(\"{$id}\").style.display = '{$style}';</script>";</div>

<div><br></div><div>The moment that you name it ['toggle'] it will only make one entry in $HTMLFooterFmt.  with the [] it will just append them all to the array with numbered indexes.</div><div><br></div><div>If you want them indexed "toggle" then yes they need unique $id appended to 'toggle" so each index is unique... which is exactly what you said worked.</div>

</div></blockquote></div><br></div>