Home > Domino Tips > Developer > Expand and collapse text within a view column
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

JAVASCRIPT

Expand and collapse text within a view column


Michael Torppey
07.21.2004
Rating: -3.00- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Ever have a field that contains a large quantity of data that you want to include in a view? A good example are those fields that keep appending data, like audit trails and comments. It's a mess and requires excessive formatting. This technique breaks it up, displays a small piece of the text (perhaps most recent) and a clickable graphic that opens up the remainder of the text. This is a Web-only solution and was built for Internet Explorer browsers.

The first step is to add placeholders within the field that will later assist the breakup. I used an agent to modify existing documents and added code to the form for future documents. Add a character you know you will not see within the text (suggestions: @ or ^).

To display the view use a form with an embedded view. The column that contains your data should be structured as follows:


  • Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


    RELATED CONTENT
    Domino
    Mimic Lotus Notes Domino application functionality on the Web
    A single form to view and edit any Lotus Notes document
    DECS and DCR external data access considerations
    How to create non-scrolling Lotus Domino view headers on the Web
    Disabling the 'Submit' button on a form
    An easier way to update a rich text field
    Results from Default Notes Search have # of responses in brackets
    Lotus Notes/Domino veteran offers comprehensive list of app dev tools
    Notes to XML. . .and back again
    Creating thumbnail images using LS2J in LotusScript

    JavaScript
    JavaScript workaround fixes Lotus Notes 8.x PostOpen event issue
    Write HTML and JavaScript in Notes view rows and columns on the Web
    JavaScript detects Web browser type and version in Notes/Domino 8.0.2
    JavaScript creates a jump box on a Lotus Notes Web form
    How to create dynamic JavaScript in Notes Domino without formulas
    Trap an attachment path via the Domino file upload control field
    Converting Lotus Notes views to XML documents using JavaScript
    Prevent errors on iFramed pages with JavaScript
    How to add keyboard functionality for Lotus Notes documents
    Validate Lotus Notes Domino fields using JavaScript

    JavaScript for Lotus Notes Domino
    JavaScript workaround fixes Lotus Notes 8.x PostOpen event issue
    Write HTML and JavaScript in Notes view rows and columns on the Web
    JavaScript detects Web browser type and version in Notes/Domino 8.0.2
    JavaScript creates a jump box on a Lotus Notes Web form
    Top 10 Lotus Notes/Domino coding and development tips of 2008
    How to create dynamic JavaScript in Notes Domino without formulas
    Trap an attachment path via the Domino file upload control field
    Converting Lotus Notes views to XML documents using JavaScript
    Mimic Lotus Notes Domino application functionality on the Web
    Prevent errors on iFramed pages with JavaScript

    RELATED RESOURCES
    2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
    Search Bitpipe.com for the latest white papers and business webcasts
    Whatis.com, the online computer dictionary


    >holdPTComments is my lengthy text field.

  • I use the domino icons wicn096.gif (minus sign, collapse), and wicn097.gif (plus sign, expand) to add some visual help.
  • The purpose of the If ... Then function is to isolate cases where there is no text, or one comment from the situations where there are more than one. Without more than more than comment there is no need to display the expand graphic.

    This JavaScript function (allComments) expands and collapses the text in the column:

    Do you have comments on this tip? Let us know.

    This tip was submitted to the SearchDomino.com tip exchange by member Michael Torppey. Please let others know how useful it is via the rating scale below. Do you have a useful Notes/Domino tip or code to share? Submit it to our monthly tip contest and you could win a prize and a spot in our Hall of Fame.

    Rate this Tip
    To rate tips, you must be a member of SearchDomino.com.
    Register now to start rating these tips. Log in if you are already a member.




    DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



  • Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
    HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Site Map




    All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts