Adding a link to expand and collapse all DHTML drop downs

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

Hi again
I want to use it in the header of one of my Master Pages, so it will only be created/maintained once. Not all my pages have drop downs in so rather than have a toolbar button available for every page, I was trying to be a bit cuter by having two Master Pages - one for normal pages and one for pages with drop downs in.
I'm no javascript expert so I'll see if one of my developers can help.
Thanks anyway
Jonathan

Similar Messages

  • Expanding and Collapsing All Nodes in a TreeByNestingTableColumn

    Hi Experts,
    I'm using NWDS 7.0.18.
    I have a table with TreeByNestingTableColumn (master column).
    The child nodes are recursive nodes and are loaded at runtime with an action onLoadChildren when clicking the master column. My question is, when the hierarchy is in its initial state, only the root node is loaded into the table. But I want to add functionality for expanding all nodes in the tree. Is there a way to achieve this, I'm a little confused because the Hierarchy children havent been loaded yet.
    Any suggestion will greatly help.
    Regards,
    Kunal.

    Hi Kunal,
    I got your problem.
    To expand & collpase all the child nodes please modify the code as below.
    Create two methods exapndAll &  collapseAll and call these two methods in existing button actions.
    as below.
    public void expandAll( com.sap.tut.wd.treetable.wdp.IPrivateTreeTableView.ICatalogEntriesNode node )
        //@@begin expandAll()
           for (int i = 0; i < node.size(); i++) {
         node.getCatalogEntriesElementAt(i).setExpanded(true);
         if(node.getCatalogEntriesElementAt(i).getIsLeaf()==false)
              expandAll(node.getCatalogEntriesElementAt(i).nodeChildCatalogEntries());
        //@@end
    public void collapseAll( com.sap.tut.wd.treetable.wdp.IPrivateTreeTableView.ICatalogEntriesNode node )
        //@@begin collapseAll()
         for (int i = 0; i < node.size(); i++) {
         node.getCatalogEntriesElementAt(i).setExpanded(false);
         if(node.getCatalogEntriesElementAt(i).getIsLeaf()==false)
              expandAll(node.getCatalogEntriesElementAt(i).nodeChildCatalogEntries());
        //@@end
    public void onActionCollapseAll(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionCollapseAll(ServerEvent)
        collapseAll(wdContext.nodeCatalogEntries());
        //@@end
    public void onActionExpandAll(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionExpandAll(ServerEvent)
        expandAll(wdContext.nodeCatalogEntries());
        //@@end
    We are invoking the methods recursively to expand/collapse all the child nodes.
    This works.
    Regards,
    Charan

  • Expand All and Collapse All with Data table

    Hi Guys,
         I have a data table as shown in code pasted . where the first and second column have row category which gives a categorization with a twisty.
         When i click on the twisty or item name the level beneath it expands. Eerything works fine.. but i need to have to links     Expand All and Collapse All which when clicked open the entire hierarchy or collapse it. Can anyone suggest a way of doing. Can it be done using javascript, I am not comfortable with java script .If someone has done this before please share the piece of code.Also please suggest the different ways of doing it. I am using RAD 7 and IBM JSF components.
         <hx:dataTableEx border="0" cellpadding="2" cellspacing="0"
         columnClasses="columnClass1" headerClass="headerClass"
         footerClass="footerClass" rowClasses="rowClass1, rowClass2" binding="#{masterPublList.tablebindData}"
         id="tableEx1" styleClass="dataTableEx" value="#{masterPublList.lst_publication}" var="varlst_publication">
              <hx:columnEx id="columnEx3">
                   <hx:panelRowCategory id="rowCategory2"
                        styleClass="panelRowCategory"
                        value="#{varlst_publication.publCategory}" collapsed="true">
                   </hx:panelRowCategory>
              </hx:columnEx>
              <hx:columnEx id="columnEx2">
                   <hx:panelRowCategory id="rowCategory1"
                        styleClass="panelRowCategory" value="#{varlst_publication.publSubCategory1}">
                        <h:outputText id="text5" styleClass="outputText"></h:outputText>
                   </hx:panelRowCategory>
              </hx:columnEx>
              <hx:columnEx id="column1">
                   <hx:outputLinkEx id="linkEx1" styleClass="outputLinkEx" value="#{varlst_publication.publUrl}" target="_blank">
                        <h:outputText id="text3" styleClass="outputText" value="#{varlst_publication.publName}"></h:outputText>
                   </hx:outputLinkEx>
              </hx:columnEx>
              <hx:columnEx id="columnEx1">
                   <h:selectManyCheckbox disabledClass="selectManyCheckbox_Disabled"
                        id="checkbox1" styleClass="selectManyCheckbox" value= "#{varlst_publication.publLang}">
                        <f:selectItems value= "#{masterPublList.lst_lang}"/>
                   </h:selectManyCheckbox>
              </hx:columnEx>
         </hx:dataTableEx>
                   Thanks in anticipation

    Hi Naamkeek,
    Per my understanding that you have added the Expand All and Collapse All button in an drill down report by adding the "Go to report" action, now you got the report always refresh and return to the first page, right?
    I have tested on my local environment and can reproduce the issue, no matter whether to add two buttons or using the parameter to do the Expand All and Collapse All, it is always return to the first page.
    Gernerally, SQL Server Reporting Services does a postback while clicking a expand/collapse icon. SSRS re-renders reports because it need to regenerate the pages to fit the defined width & Height. That is why SQL Server Reporting Services reloads
    the whole report.
    This is by design. And, currently, we are not able to turned it off.
    I would suggest you submitting a wish at
    http://connect.microsoft.com
    If the service requests frequently, we may include it in the next release.
    Appreciate your understanding, and if you have any more questions, please feel free to ask.
    Regards
    Vicky Liu

  • Expand all and collapse all in page

    Hi all,
    I need to implement* expand all and collapse all *in a custom page where I have some Link beans generated dynamically to show the allowable responsibilities.I have added the link beans and respective hide show regions in a stack layout.How to implement expand all/collapse all for this hide show in the page.
    If I'm not clear about my requirement please let me know.
    Thanks ,
    Krishna Priya Bandyopadhyay

    Hi Krishna,
    Are your hide/show items within a table or separate hide/show regions?
    Thanks,
    LC

  • Expand all and collapse all functionality in adf accordion

    Hi
    I need to implement a functionality where in there are two links "Expand All" and "Collapse All" on clicking these links the accordion should behave accordingly.
    Was wondering if this feature is possible by using <af:panelAccordion> component. Or is there any work around for this? Would using jquery be better for this fuctionality.
    Some help in here asap is appreciated.
    Thanks

    You should ask this in the ADF forum: JDeveloper and ADF

  • How to perform expand and collapse operation on click of link or button

    Hi
    Is there anyway by which i can perform expand and collapse operation over a table on click of a command link or button without using show details component.
    Is there any other alternative to show detail.
    I do not want to use show detail because of the following reason.
    I have got a page where in i pass some parameters to the URL based on which details get displayed on the page.
    Now when i pass a parameter, change the parameter, once again send the previously used parameter(i,e the parameter that i passed initially), values in the table under show detail do not show any change in values.
    Once i pass values which i have already passed, values in the table under show detail component do not refreshed.
    If anyone has encountered with similar situation, then please post me reply's as to how you could over come the problem??

    Hi
    Perhaps you could use an on-demand application process instead - you can specify these in the URL.
    The URL syntax (for your link) would be like...
    f?p=application_id:page_id:session:APPLICATION_PROCESS=process_idIs this what you mean?
    Cheers
    Ben

  • How to disable "Expand All" and "Collapse All" when no node in a tree

    I have a <af:tree> inside <af:panelCollection>.
    All items under viewMenu like "Expand", "Expand All Below", "Collapse All Below", "Expand All" , "Collapse All", "Scroll to First" and "Scroll to Last" are implemented by default.
    When there is no node in a tree, "Expand", "Expand All Below", and "Collapse All Below" are grey out.
    However, "Expand All" , "Collapse All", "Scroll to First" and "Scroll to Last" are still enabled to be clicked.
    Is there any way we can diable them when no node?

    When I highlight last node in the tree and all nodes are collapsed, I see "Expand All Below" enabled but "Collapse All Below" disabled. Which is expected. Expand All Below will expand all the child nodes under a node.
    QA filed a bug said that "Expand All Below" should be disabled since no node below it. However, I don't find any place to control them. Can you confirm this? Or you know some way to do this?It it not a bug then. You don't have to control it and framework takes care of enabling and disabling it accordingly.
    If you need to expand all the nodes programatically, check this out.
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/78-man-expanding-trees-treetables-354775.pdf
    -Arun

  • How to create labeled table of Content with expand and collapse

    Hi All,
    Can somebody help me how to create labeled table of Content with expand and collapse as example given below:
    User1
    Template1
    Template2
    User2
    +
    User3
    Template1
    Template2
    Like when we see expand (+) and collapse (-) button when we click on 'about this page' link.
    Thanks
    Bhupendra

    Hi,
    Tou can use Table inside table to show the details this way but I'm not sure about Expand/Collapse.
    Expand/Collapse are part of HGRID.
    I think we can develop this functionality with little manipulation.
    Regards,
    Reetesh Sharma
    Edited by: Reetesh Sharma on Jun 28, 2010 4:56 AM

  • Expand and Collapse(+/-) option in a Matrix SQL Reporting Services 2008

    Hello All,
    I am having Expand and Collapse(+/-) option in a Matrix SQL Reporting Services 2008. It's not working when it is havnig a Row Group and Column Group.
    Does reporting services has this flexibulity?? It's working fine if it's only have a Row Group an it's not working if it is having Row and a Column Group. Can any one suggest how to work aroung with this.
    any help much appriciated.
    Thanks & Regards,
    Jeevan Dasari.
    Dasari

    Drill-down feature is a basic requirement, it is concluded in Reporting service from SSRS2000 to SSRS2008 R2, To
    your scenario I think the root cause is relevant to your incorrect steps. Please follow the steps below and then give the feedback:
    1.     Right-click the child groups in the
    Row Groups panel which is at the left-bottom of the BIDS, and then select
    Group Properties…
    2.   
    Switch to Visibility tab, and then select
    Hide Radio-button, click the checkbox of Display can be toggled by this report item.
    3.   
    Then select the parent group datafield in the drop-down list.
    4.   
    Click OK.
    Thanks,
    Challen Fu
    Challen Fu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Can please tell me how to implement expand and collapse table row data?

    i am trying implement expand and collapse table row data but i do not get any ideas..can please any one help me its an urgent requirement

    Yes, we can.   
    I think the best place for you to start for this is the NI Developer Zone.  I recommend beginning with these tutorials I found by searching on "data log rio".  There were more than just these few that might be relevant to your project but I'll leave that for you to decide.
    NI Compact RIO Setup and Services ->  http://zone.ni.com/devzone/cda/tut/p/id/11394
    Getting Started with CompactRIO - Logging Data to Disk  ->  http://zone.ni.com/devzone/cda/tut/p/id/11198
    Getting Started with CompactRIO - Performing Basic Control ->  http://zone.ni.com/devzone/cda/tut/p/id/11197
    These will probably give you links to more topics/tutorials/examples that can help you design and implement your target system.
    Jason
    Wire Warrior
    Behold the power of LabVIEW as my army of Roomba minions streaks across the floor!

  • Expand and collapse button in maintenance view

    hi all,
               i want help for functionality of expand and collapse buttons present there in maintenance view. delimit button is also there what is the functionality for these buttons.
    u ppl can see these buttons while enetering values in standarad maintenance view V_T510
    my requirement is to create same buttons and their working in user defined maintenance view.

    Hi Chavi,
    check the PDF document
    Module Poolo tuorials
    regs,
    Hema sundar.

  • Trying to override the default af:tree expanded and collapsed icons

    Hi,
    I initially hijacked a thread from 2010 that was vaguely similar to what I need to ask, but a kind forum moderator split my post out to stand on its own merits.
    I am trying to override the default af:tree expanded and collapsed icons I am using the following styles for my af:tree but they are not reflecting any thing on my tree with the styleclass orgType.
    af|tree.orgType::expanded-icon {
    content: url("../images/ac-expand.png");
    cursor: default;
    af|tree.orgType::collapsed-icon {
    content: url("../images/ac-collapsed.png");
    cursor: default;
    af|tree::expanded-icon {
    content: url("../images/folder_open.png");
    cursor: default;
    af|tree::collapsed-icon {
    content: url("../images/folder_close.png");
    cursor: default;
    After working for long hours I realized that there is some problem with af:tree and treeTable. They are not taking the styles where as for the other components, every thing works fine. Is there any way to achieve the task. Could you suggest any alternative way to do this. Thanks in advance. Your suggestions for this task can really help me and my team a lot.
    Regards,
    Krishna Sumanth.

    Hi,
    do the icons show without the style class reference used in the skin file? If so, then the style class for this component might be rendered differently for the tree, e.g.
    .orgType af|tree ...
    Frank

  • How to expand and collapse af:showDetailItem in keyboard Tab navigation

    i would like  to expand and collapse <af:showDetailItem/> by keyboard  tab navigation. is there any default functionality is available to achieve it.
    Thanks

    Hi,
    can you try with below config in your web.xml. It specifies where to store the view state of your application
    <context-param>
          <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
          <param-value>client</param-value>
       </context-param>regards,
    Rajan

  • Drill down expand and collapse feature not available  Crystal Reports Desig

    Hi,
    Am I right in my understanding that drill down feature opens in a new tab and it cannot be made expand and collapse even using JRC.
    Please advise & thank you
    Selvi

    Hi Slevi,
    You are right with the understanding of the Drill down function. To have a drill down function available the minimum requirement is have at least a single group in the report.
    When we have a group with some underlying data and then when we would like to see data for a particular group, we can see a u201Cmagnifying glassu201D symbol which indicates that there is data for this group and we can use the Drill down function.
    When you drill on a particular group, the data for that group is shown in a new tab.
    I hope this provides some information about the Drill down function used in Crystal Reports.
    Regards,
    Prashant Saduwale.

  • Is it possible to make the TOC expand and collapse icons larger?

    OR to have the TOC expanding and collapsing by usage of a self made buttons?

    You can use graphics that are slightly taller, but not wider.
    If you go to this page and take a look at the example named Supply Chain Management, you will see that I have used a different TOC expand image that is slightly taller:
    http://www.infosemantics.com.au/portfolio
    I had originally tried to use a larger image but it appears that Captivate limits the width.
    You can use the On Success action of a button to assign the value of the cpCmndTOCVisible system variable to 1 or 0 to open or close the TOC.  You can create a toggle action using a Standard or Conditional action to make the same button alternately open or close the TOC each time it is clicked.

Maybe you are looking for

  • Really disappointed with the Macbook pro

    Hi all, I purchased a Macbook pro in the middle of January 2011 with some inheritance money. I went for the cheapest one - was going to go for the white macbook like my partner but thought it would be worth the extra money to upgrade to the pro. It w

  • Probelms while replicating Data Source and transport into test system

    I find  the following error messages whilre transporting into test system. DataSource 0EC_PCA_1 does not exist in source system of version A. Mapping between data source 0EC_PCA_1 and source system  is inconsistent. DataSource 0EC_PCA_1 does not exis

  • Amount diff in Payroll results and Posting amount

    In payroll results ie EDLI Contribution shows as 3,500/- to the 100 employees, but in posting document it shows EDLI Contribution amount as 5,000/-(G/L account). Why the difference amount occured? What is the solution for this? Please guide me !

  • Itunes  7 for Windows won't start....no matter what

    Itunes 7.115 will install, but will not start. Shows no sign of trying to start up in Task Manager.It evokes a Windows general error with the following error signature in details: AppName: itunes.exe AppVer: 7.1.1.5 ModName: kernel32.dll ModVer: 5.1.

  • Adobe Acrobat Pro X Cannot Read Arial Font

    I recently upgraded to Acrobat X on Windows 7 When I open PDFs there is an error message which states "Cannot find or create the font 'Arial'.  Some characters may not display or print properly" Is there an update or a patch for this?  Any input woul