Expand or Collapse All Messages in a Thread in the EE Messaging System

Published on
8,301 Points
6 Endorsements
Last Modified:
Joe Winograd, Fellow&MVE
50+ years in computer industry. Everything from development to sales. CIO. Document imaging. EE MVE 2015, EE MVE 2016, EE FELLOW 2017.
In Q3 of last year, Experts Exchange introduced a new Messaging System, allowing any member to communicate directly with other members.

During an especially long thread with a member, I wanted to go back to previous messages in the exchange to refresh my memory on an issue. However, the Message System doesn't have a Search function that allows you to search the contents of all messages in a thread. But then it occurred to me that I could take advantage of the search feature in my browser, Firefox (Edit>Find or Ctrl-F). However, to do that, all of the messages would have to be expanded by clicking the plus sign next to each one:
Plus-sign---Expand.jpgThat's very painful in a long thread! So I submitted an enhancement request entitled Need the ability to expand/collapse all messages in a thread  in the Messaging System testing project. An EE Administrator, eenookami, replied to my request with a fantastic work-around — JavaScript code to expand all messages in a thread, as well as JavaScript code to collapse all of them.

In the spirit of giving credit where credit is due, all of the credit goes to eenookami for this solution. My only minor contributions are taking the time to write the article in order to share the solution with other members of the EE community and adding an explanation of how to place the Expand All and Collapse All items on the Firefox Bookmarks Toolbar (I'm sure this can be achieved in other modern browsers, but this article discusses only Firefox — I hope other members post comments on this article explaining how to do it in other browsers or, even better, write their own articles on it).

Here are the solution steps for Firefox (probably works on all releases, or at least relatively recent ones):

o  If you don't already use the Bookmarks Toolbar, click the View menu, then Bookmarks, then Bookmarks Toolbar.

o  Click the Bookmarks menu, then Show All Bookmarks.

o  In the left pane, right-click on the Bookmarks Toolbar and then click New Bookmark:

o  Give whatever name you want to the bookmark that will expand all messages (such as ExpandAll) and then place eenookami's clever JavaScript code in the Location field:


It should look like this:

o  Give whatever name you want to the bookmark that will collapse all messages (such as CollapseAll) and, once again, place eenookami's clever JavaScript code in the Location field:


It should look like this:

Now a single mouse click on the ExpandAll icon on the Bookmarks Toolbar will instantly expand all messages in the thread for easy perusal and, even better, searching for text via Edit>Find (Ctrl-F). Likewise, a single mouse click on the CollapseAll icon on the Bookmarks Toolbar will instantly collapse all messages in the thread.

Thanks again to eenookami for this excellent work-around (until Search and/or and Expand/Collapse features are added to the EE Messaging System), as well as for giving me permission to write and publish an EE article about the solution.

If you find this article to be helpful, please click the thumbs-up icon below. This lets me know what is valuable for EE members and provides direction for future articles. Thanks very much! Regards, Joe

Expert Comment

by:Rob Jurd
Great Article Joe and thanks for giving me kudos however no one would know about it without taking it a step further with this article contribution.

For those interested, it is called a bookmarklet and it will work it all browsers.  For those adventurous ones, you can write your own bookmarklets to do anything on the site you would otherwise do with a click or a keypress on your keyboard.  I'll leave the examples for your imagination...

The bug report that started this is: http://support.experts-exchange.com/customer/portal/articles/1162518


LVL 59

Author Comment

by:Joe Winograd, Fellow&MVE
Hi eenookami,

Thanks for the compliment and the Helpful Vote — I appreciate both! Additional thanks for the further explanation of bookmarklet — very interesting!

Btw, the link you posted for the bug report that started this does not seem to be right, but it gave me the idea to include that link in the article, which I will do in a moment. Regards, Joe

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Join & Write a Comment

In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month