Today I got a requirement to put a check if person is not using Internet Explorer higher than 6 and Mozila Firefox higher than 2.5 , don't allow them to access the site since site is developed for IE ( version 6 or later) and Mozila (2.5 or later).

The first Easy stuff I did to test @BrowserInfo("Platform") and @BrowserInfo("Version")formulas in Explorer,Mozila and Safari. I saw strange stuffs, IE shows type "Explorer" and version 7 ( Which was right because I have version 7), but Mozila and Safari both shows type as "Mozila" and version 5, Whereas I am having Mozila 3 and Safari 3.2. Soon I realized this is not going to be a easy fix.

Next, I thought to check "The Navigator Object" which is having two property to detect browser type and version

appName - holds the name of the browser
appVersion - holds, among other things, the version of the browser

But as soon as tested found , wrong results again. Also found following warning in W3Schools ,

IMPORTANT! The version number is WRONG in IE 5.0 or later! Microsoft starts the appVersion string with the number 4.0. in IE 5.0 and IE 6.0!!! Why did they do that??? However, JavaScript is the same in IE6, IE5 and IE4, so for most scripts it is ok.

Now what Next.. After spending couple of hours able to implement JavaScript which works well for all the browsers and provides correct type with version number. Here was my final JS code,

You just need to use in the JS file or JSHeader and call their methods like,

Since I can't post JS directly on the blog so posted as image, write me for JS code.

This tip is published in Search Domino website , Vote this tip if you like...

One of the user in Notes 6 forum asked how to keep unique records in the view. I have given very simple solution , In view's advanced tab try to check "Generate unique keys in Index" check box.

I have noticed still people thinks this option is only for ODBC. But believe me it works well to keep unique records in the view. Hidden tips :)

Here is the conversation ,

Open your browser and navigate to to open Tom Riddle’s diary.

Type something into the diary, such as the question, “What’s your name?” You’ll get
an answer (the answer to “What’s your name?” turns out to be: “My name is Tom Marvolo
Riddle, also known as Lord, forget that last thing will you.”).
You can ask detailed questions—the diary has been written to appear quite intelligent. Try
“Where are you?”, “How old are you?”, and “What is the meaning of life?”

The diary is actually an Ajax-enabled web application. If you type into it, it’ll connect to
its server using Ajax, and type a response back. For example, if you type “Hello,”
the diary will type back “Hi there!”.
Behind the scenes, the web page connected to its server, sent what you typed to that server,
and got a response back, which it displayed. Cool.

Here is another useful link

preload preload preload