url is the url to goto if the requirement is not met.
Include version.txt in the HEAD section of your document.
Call the functions as shown in the above example.
version.txt
===========
<SCRIPT language="JavaScript">
<!-- Browser Version
// Cameron Gregory - cameron@bloke.com
// http://www.bloke.com
// http://www.bloke.com/javascript/Version/
// This header must remain if you use this script or modify this script
//CHANGELOG
// Sun Mar 8 16:43:18 EST 1998
// Created.
function RequiresVersion(needsver,url)
{
ver = navigator.appVersion.substring(0,1);
if (ver < needsver)
window.location=url;
}
function RequiresVersion2(url)
{
RequiresVersion(2,url)
}
function RequiresVersion3(url)
{
RequiresVersion(3,url)
}
function RequiresVersion4(url)
{
RequiresVersion(4,url)
}