3 Replies Latest reply: Jun 20, 2013 7:17 AM by Locke90210 RSS

    hide and show region - hide by default

    Locke90210
      Hi everyone,
      I have got a hide and show region on my page. I want to hide this region by default(on every page load).
      Actually, it's open by default.
      How can I receive that ?
      I tried a lot of things, searched a lot for solving that.
      But I can't find a solution, which helped me.
      I'm using an non Standard apex theme.
      Any suggestions?
        • 1. Re: hide and show region - hide by default
          Locke90210
          Here is my "hide and show Region" Template code:
          <table class="t5HideandShowRegion" id="#REGION_ID#" border="0" cellpadding="0" cellspacing="0" summary="">
            <tr><td class="t5RegionHeader">#TITLE#<a style="margin-left:5px;" href="javascript:hideShow('region#REGION_SEQUENCE_ID#','shIMG#REGION_SEQUENCE_ID#','#IMAGE_PREFIX#themes/theme_5/rollup_plus_dgray.gif','#IMAGE_PREFIX#themes/theme_5/rollup_minus_dgray.gif');" class="htmldbHideShowMinLink"><img src="#IMAGE_PREFIX#themes/theme_5/rollup_plus_dgray.gif" 
            id="shIMG#REGION_SEQUENCE_ID#" alt="" /></a></td></tr>
          <tr><td nowrap="nowrap"><div class="t5Hide" id="region#REGION_SEQUENCE_ID#"><div class="t5ButtonHolder">#CLOSE#<img src="#IMAGE_PREFIX#themes/theme_5/1px_trans.gif" height="1" width="15" alt=""/>#PREVIOUS##NEXT##DELETE##EDIT##CHANGE##CREATE##HELP#</div><div class="t5RegionBody">#BODY#</div></div></td></tr>
          </table>
          What do I have to change?
          • 2. Re: hide and show region - hide by default
            pjflynn

            Firstly run the page using firefox or chrome and identify the region name, i.e. the #REGION_ID# in the template will translate to something like 'region5' when rendered.

             

            Edit the Page, in the Javascript section Execute when Page Loads, enter the following

             

            hideShow('region5','shIMG5','<path to the image take it from the rendered page>','<path to the image take it from the rendered page>');

             

            this should toggle the current show / hide mode.

            • 3. Re: hide and show region - hide by default
              Locke90210

              Thanks =)