Forum OpenACS Q&A: Re: Status of the "Nice Text Entry Widget"

Lars

Is this an improved version of the one that was working in IE in earlier versions of OACS? A quick glance at my 5.0.4 code shows that the javascript is still present in richtext-procs.tcl but I don't think it shows up in forms on IE.

The problem with checking user-agent is that they are spoofed to bypass problems with sites that check user-agents :o). For instance I believe Opera defaults to giving an IE user agent by default - or atleast its trivial to change. And indeed I have changed the user-agent in Galeon to spoof IE to allow me access to a site that throws up a stupid objection to accessing it in an non-M$ browser (even though it works without problems). A more reliable method is to use feature testing to determine if code should be executed e.g

if (document.getElementById) {
    W3C DOM API CODE
} else if (document.all) {
    IE 4 API
} else if (document.layers) {
    NETSCAPE 4 API (god help us)
} else {
   DON'T BOTHER
}

-Steve