[thelist] Netscape 6.1, radiobuttons, and DTD

lon.kraemer lwkraemer at directvinternet.com
Fri Mar 1 12:34:01 CST 2002


James,

Well, this certainly is a twist... a 'hack' (if you will) to circumvent a
flawed (IMHO) 'standard'! And we wonder why there's no such thing as 'a
fully standards compliant browser'?

>     If you want to code to the RFC but don't want to offer the user a
> prejudicial or possibly confusing default selection, you can easily use
CSS
> to do this, e.g.:
>
> <html>
>   <head>
>     <title>Hide the Default Radio Value</title>
>     <style type="text/css">
>       .default {
>         display: none ;
>       }
>     </style>
>   </head>
>   <body>
>     <form>
>       <input type="radio" name="Radio1" value=""
>         class="default" checked="checked"><br class="default">
>       <input type="radio" name="Radio1" value="1">One<br>
>       <input type="radio" name="Radio1" value="2">Two<br>
>       <input type="radio" name="Radio1" value="3">Three<br>
>       <input type="submit">
>     </form>
>   </body>
> </html>
>
>     So, the first radio element contains the "checked" attribute,
providing
> a default value (an empty string in this case) for the group. Most UAs,
> which support CSS, will hide both the initial radio element as well as the
> following <br> element. Obviously, this is a very rudimentary example that
> could be modified and improved.
>
> James Aylard

---------------------
Lon Kraemer
-----------------------------------------
- t r a n s m i s s i o n   c o m p l e t e -




More information about the thelist mailing list