Cross-Browser Form Element Dynamic Borders

Don't forget htmlentities, if you have to use an action form attribute and you're using php_self with it, as in action="<?php echo htmlentities($_SERVER['PHP_SELF'])?>".

Input element borders have been used by gmail since about 2006. But unlike gmail, as of early 2009, we prefer to use DOCTYPE xhtml strict. This should compel browsers to get into standards mode.

Windows IE7 does not use the dynamic psuedo-class ":focus" so we elected to use JQuery to dynamically add/remove a "focus" class. To spare this overhead for other browsers, we use MS 'conditional comments' to have IE add and remove the "border_focus" class to get our dynamic borders.

Do NOT call JQuery.bind with "form:text" as this will fail miserable. Instead use "form :text" or just ":text". Tested on win XP IE7 & FF 3.

Site designed and maintained by Freedom Communications | validate xhtml, css