Tip

Getting rid of extra space in Web outlines

View member feedback to this tip.

When Domino generates the HTML for an outline, it creates a "column" for the twisties and a "column" for outline entry images. This way all of the text in an outline is nicely aligned. Domino creates these 2 "columns" by adding 2 "ecblank.gif"s before the actual links in the outline - the gif for the twisty is 16 pixels wide, the gif for the image is 20 pixels wide. Domino does this whether or not you have any twisties or images - and you cannot get rid of them. Therefore, you may be losing up to 36 pixels of space on the left hand side of your outline. This can be valuable space.

Here is some sample HTML source code for one outline entry. The first ecblank.gif is a 16 pixel 'placeholder' for the twisty. The second ecblank.gif is a 20pixel placeholder for the outline entry image.

<TR><TD WIDTH="100%" ALIGN=left VALIGN=top><IMG BORDER=0 
HEIGHT=16 WIDTH=16 SRC="/icons/ecblank.gif" ALT=""><IMG BORDER=0
SRC="/icons/ecblank.gif" HEIGHT=1 WIDTH=20><FONT COLOR="000000"><A
HREF="/db.nsf/vwCustName?OpenView">Customers</A></FONT></TD></TR>

Here is how to recover that lost space.

In the onLoad event of the Page with the embedded outline, add the following code:

lg = document.images.length
for(x=0; x<lg; x++) {
 isrc = document.images[x].src
 i = isrc.indexOf("ecblank")
 if (i != -1) {
  if(document.images[x].width==20) document.images[x].width=0
 }
}

In the case above, my outline does have twisties, so I am only resizing the ecblank.gifs that have a width of 20. If your outline is completely flat and has no images, remove the 'width==20' check and resize all ecblank.gifs to 0.


MEMBER FEEDBACK TO THIS TIP

This was a very good tip! However, I did have to make an adjustment that I thought should have appeared in the tip itself. I had to turn the code into a function and then call the function in order to get it to work. Someone new to JS or Domino may not know to do that. Thanks for the tip, it was VERY useful.

-- Karen D.


Do you have comments of your own? Let us know.

This was first published in April 2002

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

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.