Notes Ninjas Notes Ninjas
Lotus Notes hints, tips, error messages
Checkbox Columns in Table on Web

Hint Short Cut: Add this to your code & documentation to help you find this page.
http://www.notesninjas.com/#DominoCheckboxColumns or http://www.notesninjas.com/A555F9/nn.nsf/ByAlias/DominoCheckboxColumns


Checkbox Columns on a lotus notes domino web page are a bit of a palaver, as they do not match up nicely in even columns. This is a bit of a problem and was an issue for a customer, there are a few different options for solving this, some using the javascript DOM etc but here is mine. It is pretty simple an works well when saving and reopening the document.





 

Put on the notes form pass thru html:

<table border=0 rowpadding=0 rowspacing=0 CELLSPACING=0 CELLPADDING=0  style='border-collapse: collapse;' ><tr>

then put the checkbox field "Call_Type" as before, but with properties  HTML Style

display:none;

and put in an properties html id eg:

two_col_checkbox

Then you need a computed field with pass thru ticked:


lookup:=@DbLookup("""""keywords""Call Type";2);
r:=@If(@IsError(lookup);"Could not find keyword 'Call Type'";lookup);
st:=" style='  font-family: Arial, Helvetica, sans-serif; font-size: 10px; font-weight: normal;' "
cols:=2;
list:= ""
@For(n:=1;n<=@Elements(r);n:=n+1;

a := @If(@Modulo(n;cols)=0;
"<td "+st+"><small><input style='vertical-align:middle;' type=\"checkbox\" name=\"Call_type\" "+@If(@IsMember(r[n];Call_type);" checked """)+" value=\""+r[n]+"\" id=\"two_col_checkbox\" >"+r[n]+"</small></td></tr><tr>"
"<td "+st+"><small><input style='vertical-align:middle;' type=\"checkbox\"   name=\"Call_type\" "+@If(@IsMember(r[n];Call_type);" checked """)+" value=\""+r[n]+"\" id=\"two_col_checkbox\" >"+r[n]+"</small></td>" );

list:= @If(list=""a;list:a)

);

@Implode(list;" ")+@If(@Modulo(n;cols)>0;"</tr>""")

then finish off web page with:

</table>

This worked well in Internet Explorer 7 and Firefox 3.0.7 and should work in all browsers.

 

 Jump to:     Notes Tips
    Lotus Notes Index 
  Register for Tips
Previous Lotus Notes Tip 
    Next Lotus Notes Tip
Your company logo here?
Adam Foster
Free Cash Making Web Site
Free Revenue Earning Blog Site
 Free Revenue Earning Newsletter Site   
Free Search Pages Free Web stats
Free Contact Us page
Cheap .com domain names
 Need a website or 
   Lotus Notes
  problem solved?
Adam Foster
Web Services Platform Architecture: Soap, WSDL, WS-Policy, WS-Addressing, WS-Bpel, WS-Reliable Messaging and More by Francisco Curbera, Frank Leymann, Tony Storey, Donald Ferguson, Sanjiva Weerawarana
Other books claim to present the complete Web services platform architecture, but this is the first one I've seen that really does. The authors have been intimately involved in the creation of the architecture. Who better to write this book?
See at: Amazon.co.uk | Amazon.com |