Aaron, The bottom line really is then, in the internet world, there no really rules and consistent methods. You have PHP only methods, I have WCX only methods, others have their own methods. (Incidentally the PHP Windows developer use to work for us when it wasn't a "big thing" then. :-))
Many times the internet specs W3C, IETF, etc, specifications are specifically written to allow for flexibility. There is an old IETF adage: "be flexible (liberal) with what you receive, strict (conservative) with what you create." Meaning, when you have strict control over your code, no 3rd party, etc, you can do things like unique ids. But when you are dealing with 3rd party software interfaces, you have to flexibile to deal with quirks, side-issues, things that you really don't have control over many times. Who knows? Maybe some 3rd party plugin is going to inject an hidden div with id that might conflict with yours? Thanks for your comments. -- HLS On Sep 5, 4:36 am, "Aaron Heimlich" <[EMAIL PROTECTED]> wrote: > On 9/5/07, Pops <[EMAIL PROTECTED]> wrote: > > > > > No, I am not describing CSS. > > Perhaps "CSS classes" wasn't the right term to use. What I really meant was > that you should be using the HTML "class" attribute if you want to assign an > identifier to many elements; it can be for many more things than just CSS > classes[1]. > > The class attribute, on the other hand, assigns one or more class names to > > > an element; the element may be said to belong to these classes. A class name > > may be shared by several element instances. The class attribute has several > > roles in HTML: > > > * As a style sheet selector (when an author wishes to assign style > > information to a set of elements). > > * For general purpose processing by user agents. > > In practice, when it comes to the element attributes and HTML design, > > > there is really only one attribute that MUST be unique for a properly > > operating design - FORM field names simply because its serialization > > depends on it. > > And even this is not necessarily true[2]. I've been able to do this: > > <input type="checkbox" name="spam[]" value="email"> Spam me by Email > <input type="checkbox" name="spam[]" value="phone"> Spam me by Phone > <input type="checkbox" name="spam[]" value="postal"> Spam me by Snail Mail > > in PHP for quite some time now. On the PHP side I'd get an array named > 'spam'[3] that would contain the values of the checkboxes that were checked. > > [1]http://www.w3.org/TR/html401/struct/global.html#adef-class > [2] Though it might be if you're not using the Form Plugin > (http://www.malsup.com/jquery/form/). I've never done form handling without > it, so I wouldn't know. > [3] More specifically, $_POST['spam'] or $_GET['spam'] depending on how the > form was submitted > > -- > Aaron Heimlich > Web Developer > [EMAIL PROTECTED]://aheimlich.freepgs.com