On Jul 8, 2005, at 1:37 AM, Chris Taylor wrote:
> I've been using the dash and period in ID names a lot recently (part 
> of an unobtrusive DOM scripting set of functions I've been developing)

> and not found any problems yet in any of the Win browsers. Whether IDs

> formatted like this "functionName.-fe-4r-6s-ef-s5-ef.2000" will work 
> in older browsers or different operating systems I'm kind of crossing 
> my fingers about!

Ben Curtis replied:
> By "not found any problems" I assume you mean that these IDs are only 
> referenced by your script, and not the CSS. JS only requires that IDs
are 
> strings. Trying to assign styles to your elements via CSS would be 
> > problematic, since each period would be interpreted as a class name 
> indicator, and your middle classname starts with a hyphen (an illegal 
> start). But if you are only accessing the info via JS, then it should
be 
> fine.

Absolutely, and although it would be better to be able to use these IDs
for CSS, at the moment it's not essential. Actually, I could have
modified the IDs so they didn't have dashes in, but my JavaScript skills
gave up at that point.

Chris
******************************************************
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************

Reply via email to