Skip to main content
    Country/region select      Terms of use
     Home      Products      Services & solutions      Support & downloads      My account     

developerWorks  >  Lotus  >  Forums & community  >  Best Practice Makes Perfect

Best Practice Makes Perfect

A collaboration with Domino developers about how to do it and how to get it right in Domino

I've been noticing recently several comments were automatically blocked. I believe this is happening because the poster's browsers were set to not execute JavaScript code. This is how the Domino blog application distinguishes between legitimate posts and spambots -- if it can execute JavaScript (and the IP address hasn't been manually blocked), it's presumed to be legitimate.
If this is causing you a problem, sorry -- it does keep the spam down very effectively, and in any case I don't have the option to turn it off. Send me email and I will unblock individual posts as needed.

Andre Guirard | 9 February 2008 04:00:00 AM ET | Caribou Coffee, Plymouth, MN, USA | Comments (4)


1) There’s bad JS in this DB.
Erik Brooks | 2/10/2008 11:26:25 AM

I mentioned this before, but it was awhile back.

Steps to reproduce:

1. Open a blog entry to add a comment.

2. Fill in the "Comment" field.

3. Leave subject & name blank.

4. Hit "Submit".

The validation that attempts to run is broken, causing the JS to quit executing and the form to submit anyway. You'll end up with a simple white screen that says "Refused."

Here's the problem:


function commentValidation(){

var r=true;

var vEmail="No";

var vSubject="Yes";

var vName="Yes";

var vText="Yes";

var msg="Unable to post comment because:"+"\r\r";

var mEmail="An email address is required";

var mSubject="A subject is required";

var mName="Your name is required";

var mText="A comment is required";



//********* THIS LINE BOMBS *****************


if(!isNull({if(vEmail=="Yes" &&""){r=false;msg+=mEmail+"\r"}};

if(!isNull(f.subject)){if(vSubject=="Yes" && f.subject.value==""){r=false;msg+=mSubject+"\r"}};

if(!isNull({if(vName=="Yes" &&""){r=false;msg+=mName+"\r"}};

if(!isNull(f.textcomment)){if(vText=="Yes" && f.textcomment.value==""){r=false;msg+=mText+"\r"}};


return r;



f isn't defined.

2) Number of comments is not correct
Jens Winkelmann | 2/10/2008 7:03:48 PM

There is another problem with the blog application.

The number of comments displayed in brackets is not always correct.

Sometimes you find more comments when you follow the comment link

than the number in brackets says.

3) Thanks for the additional info
Andre Guirard | 2/11/2008 9:03:15 AM

Erik and Jens, thanks for the updates. I've reported Erik's information to the folks who maintain this application for me. They're already working on updating the design to the 8.0 version, which I'm hoping may fix these problems -- we'll see.

4) how about automatically filling in the Subject of a comment?
Charles Robinson | 2/11/2008 1:40:46 PM

I'm subscribed to your comment feed and I have absolutely NO CLUE what most of the comments are in reference to. Let people overwrite the subject if you must, but the default should be something like RE: [topic].

 Add a Comment
Comment:  (No HTML - Links will be converted if prefixed http://)
Remember Me?     Cancel

Search this blog 


    About IBM Privacy Contact