DOMValidators and Firefox
Sometime ago, I released a set of free set of controls
called the DOMValidators ( available
here
http://www.theglavs.com/DownloadItem.aspx?FileID=28) that are a set of client side validation controls that
basically mimic the validators that come with Visual
Studio.NET 2003 except that they work in many other
browsers apart from just Internet Explorer.
At least once a week, I get an email from somebody asking
why they do not work in Firefox. The reason is that they
were developed prior to the release of Firefox. In order
for Firefox to be recongised as an uplevel browser (which
causes the appropriate Javascript to be generated for
client side operation), an entry must be added to the
web.config <browsercaps> section. This is shown
below so that you can copy and pase it in.
<case match="^Mozilla/5\.0 \([^)]*\)
(Gecko/[-\d]+)(?'VendorProductToken'
(?'type'[^/\d]*)([\d]*)/(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*)))?">
browser=Gecko
<filter>
<case match="(Gecko/[-\d]+)(?'VendorProductToken'
(?'type'[^/\d]*)([\d]*)/(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*)))">
type=${type}
</case>
<case> <!-- plain Mozilla if no VendorProductToken found
-->
type=Mozilla
</case>
</filter>
frames=true
tables=true
cookies=true
javascript=true
javaapplets=true
ecmascriptversion=1.5
w3cdomversion=1.0
css1=true
css2=true
xml=true
tagwriter=System.Web.UI.HtmlTextWriter
<case match="rv:(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*))">
version=${version}
majorversion=0${major}
minorversion=0${minor}
<case match="^b" with="${letters}">
beta=true
</case>
</case>
</case>
This set of changes was actually submitted by a user
of the DOMValidators who provided some feedback to me
(in this case Tim Conama but there
have been many others). I have to say that some of the
users have been really helpfull in providing feedback
and fixes to various bugs so to those who have done
this, a
big thank you.
Your probably thinking, "Why dont you just update the controls to include
this?". Well I could, but a) I am lazy and b) these
controls have been superseded by what is available in
VS2005 so I dont really want to put much effort into
these. There are a number of other issues that need to
be resolved with the validators, and if I start
modfying them, I'll get carried away and spend way too
much time on them. A lame excuse? Yeah it is, but I
have been called a lot worse things than lame before .
. .