8 Replies Latest reply on Mar 4, 2010 6:58 AM by Willam van Weelden Branched to a new discussion.

    Adding a link to expand and collapse all DHTML drop downs

    Jop Smith Level 1

      Hi, can anyone help me adapt the "Skinny on Skins" example "Add a Toolbar button to expand and collapse all DHTML drop downs" so that it will work with just a simple HTML link in RH8, instead of being attached to a custom skin button?

       

      The example looks like this:

       

      Step 1. Open the Skins Editor for the skin where you want to add the button.

       

      Step 2. After the preview loads into the window, ensure that the Toolbar tab has focus, then click the plus symbol. The Custom Toolbar Item dialog should display.

       

      Step 3. Type the Item Name (This is simply an internal reference for the button).

       

      Step 4. Type the Text (This is the text that will be seen by the end user. The field must contain something. So if you don't want any verbiage to display for your toolbar item, simply type a space.)

       

      Step 5. Choose your Image Options, then click the Action tab.

       

      Step 6. Click the JavaScript option button.

       

      Step 7. Enter the following code in the OnClick field:

       

      javascript:toggle()

       

      Step 8. In the JavaScript area, ensure the Inline JavaScript option button is selected, then click the edit (Pencil) icon located to the right.

       

      Step 9. Enter the following code in the Inline JavaScript dialog

       

      var show = "false";
      function toggle() {
      parent.frames[1].bsscright.focus();
      var arrayofDivs = parent.frames[1].bsscright.document.all.tags('DIV');
      if (show == "false") {
      for (x=0;x<arrayofDivs.length;x++) { arrayofDivs[x].style.display = "block";}
      show = "true";}
      else {
      for (x=0;x<arrayofDivs.length;x++) { arrayofDivs[x].style.display = "none"; }
      show = "false"; }
      }

       

      Step 10. Click the OK button to close the Inline JavaScript dialog.

       

      Step 11. Click the OK button to close the Custom Toolbar Item dialog.

       

      Step 12. Click the OK button to close the Skin Editor.

       

      Step 13. Generate WebHelp via File > Generate > WebHelp and ensure that you have the new button selected with a check mark. This will probably require stepping through some screens to see the place where you can select it.

       

      Many thanks

      Jonathan