in reply to Auto-case swap in the Chatter Box

I'd write a bookmarklet to do this. Yeah, you have to have JavaScript enabled, but it's all handled on the client side. This really doesn't seem like a server problem.

Replies are listed 'Best First'.
Re: Re: Auto-case swap in the Chatter Box
by sgifford (Prior) on Jun 28, 2003 at 08:15 UTC
    Here's a bookmarklet that does this. You'll probably have to squish it all together on one line..
    javascript:(function(windowOrLayer) { if (!windowOrLayer) { windowOrLayer=window; } for (var f=0;f<document.forms.length;f++) { for(var i=0;i<windowOrLayer.document.forms[f].elements.length;i++) { if (windowOrLayer.document.forms[f].elements[i].name == "true" && windowOrLayer.document.forms[f].elements[i].type == "text") { s=""; for(var c=0; c<windowOrLayer.document.forms[f].elements[i].value.length; c++) { ch=windowOrLayer.document.forms[f].elements[i].value.charAt( +c); if (ch >= 'a' && ch <= 'z') { ch = ch.toUpperCase() } else if (ch >= 'A' && ch <= 'Z') { ch = ch.toLowerCase() }; s = s + ch; } windowOrLayer.document.forms[f].elements[i].value=s; } } } })();
    Update: Fixed error in checking form element name.