Re: [WSG] Jquery and/or Yahoo UI

2007-10-13 Thread Dan Dorman
On 10/12/07, Simon Cockayne <[EMAIL PROTECTED]> wrote:
> Am I going to see green lights* in Firefox for standards compliance,
> error-free CSS and Javascript...oh...and will the HTML and CSS validate?

I don't think _any_ Javascript libraries would affect HTML/CSS
validation in any way whatsoever, because the validators don't even
_use_ JS: they look at the source the way it's originally served up,
before any possible JS modifications.

Or is this incorrect? Do any of the validation tools revise their
validation states based on JS interaction?

:Dan Dorman


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Safari beta for Windows won't display correctly

2007-07-18 Thread Dan Dorman

On 7/18/07, Kevin Murphy <[EMAIL PROTECTED]> wrote:

It looks identical to me on Safari Windows/Mac, Firefox Windows/Mac, and
IE7.


On 7/18/07, dwain <[EMAIL PROTECTED]> wrote:

the partners div is set to 760px wide and the text is aligned left.
there is a 2em margin top and bottom on the word partners and the font
for the gallery text is 80% in times new roman, times, serif.  what i am
seeing in safari windows beta is what i described above and the font is
arial.


The Agora image is left justified in every Windows browser I've tried
it on:  IE6, Firefox 2, and Safari.

:Dan Dorman


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Javascript problem

2007-06-21 Thread Dan Dorman

On 6/21/07, Dan Dorman <[EMAIL PROTECTED]> wrote:

function alternateRows(tableID,numberOfColors,colorArray){
  [snipped]
  if (table) {
var trs=document.getElementById(tableID).getElementsByTagName("TD");
[snipped]
}
  }
}


Whoops!  I got a little careless.  The line starting with "var
trs...", while it will still work, is needlessly verbose, since you've
already got the results of getElementById. You can rewrite that line
as:

var trs = table.getElementsByTagName("TD")

to save a few processor cycles and a few keystrokes.

Dan Dorman


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Javascript problem

2007-06-21 Thread Dan Dorman

On 6/21/07, Paul Collins <[EMAIL PROTECTED]> wrote:

I hope this is on topic, please ignore it if not, I have a small
Jscript problem that shouldn't be hard to sort out, but I am not great
with these things...


I'm assuming from the subject that you're actually referring to
Javascript. Jscript is a similar implementation by Microsoft that's
just different enough to screw things up.


So when I am viewing all other pages, it comes up with this error:

document.getElementById(tableID) has no properties


Since there isn't an element with an id attribute equal to tableID,
getElementById returns null.  However, in your script:


var 
trs=document.getElementById(tableID).getElementsByTagName("TD");


... you're using the method getElementsByTagName of the element object
returned by getElementById.  This is fine, as long as getElementById
returns something, as it does when the table is present on the page.
However, when the table isn't there, getElementById returns null ...
and null doesn't have any properties (or methods), hence the error.
You're basically saying:

var trs = null.getElementsByTagName("TD")

However, it's a simple fix:  run getElementById on its own, check that
it returned something, then run getElementsByTagName on the element
which you now know exists.  Something like so:

function alternateRows(tableID,numberOfColors,colorArray){
 var table = document.getElementById(tableID);
 if (table) {
   var trs=document.getElementById(tableID).getElementsByTagName("TD");
   len=trs.length;
   var myColors=colorArray.slice(0,numberOfColors);
   while(len--){
 trs[len].style.backgroundColor=colors[len%myColors.length];
   }
 }
}

The stuff inside the if statement won't execute unless table exists.
Hope that helps!

Dan Dorman


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Acronym tag usage

2007-05-11 Thread Dan Dorman

On 5/11/07, Nick Fitzsimons <[EMAIL PROTECTED]> wrote:

The OED seems pretty clear on the issue:

abbreviation, noun:
a shortened form of a word or phrase
<http://www.askoxford.com/concise_oed/abbreviation>

acronym, noun:
a word formed from the initial letters of other words (e.g.
laser, Aids)
<http://www.askoxford.com/concise_oed/acronym>

initialism, noun:
an abbreviation consisting of initial letters pronounced
separately (e.g. BBC)
<http://www.askoxford.com/concise_oed/initialism>


Fantastic!  This is exactly the sort of reference I was looking
for--but I was unable to find a version of the OED through which I
could search.

If the OED says it, I'll buy it.  Thanks, Nick!

Dan Dorman


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Acronym tag usage

2007-05-10 Thread Dan Dorman

On 5/10/07, Kevin Futter <[EMAIL PROTECTED]> wrote:

Russ is indeed absolutely correct. These terms are confused all the time,
and while colloquial use might have become blurred in recent years, their
technical definitions have not.


I'm genuinely interested in seeing some references on the proper
technical definitions of the terms; apparently even linguists don't
agree, and fifty/sixty years of usage (at least) seems a rather loose
interpretation of "recent years."

I was unable to dig up any positive position one way or t'other, just
varying opinion.

I promise, I won't argue any more on the matter, since this is getting
awfully pedantic, but I am genuinely curious:  if anyone has some
concrete sources on the subject, please let me know; off list would be
fine.

Dan Dorman


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Acronym tag usage

2007-05-10 Thread Dan Dorman

On 5/10/07, David Dorward <[EMAIL PROTECTED]> wrote:

(and its another initilism mislabelled as an acronym)


Actually, that's correct usage of acronym, in terms of both HTML
syntax and dictionary definition [1].  It just depends on how one
thinks of an acronym.

Incidentally, it it strikes me as somewhat silly to fuss about whether
to use an  or a  tag, when the two terms are
effectively synonymous, but I'd lean toward always using , since
it's an umbrella term that can encompass acronyms, alphabetisms,
initiliasms, or whatever else you want to call them, as well as terms
that are simply being abbreviated.  Since the word "acronym" seems to
have more use internationally [2], that's one point in favor of
, but again, if it's covered by , why bother?  (Other
than IE 6, of course--by the way, thanks for that tip, Nick, I'll have
to give it a whirl.)

1.  http://m-w.com/dictionary/acronym
2.  http://en.wikipedia.org/wiki/Acronym#Nomenclature

Dan Dorman


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] How to mark up a flowchart?

2007-03-26 Thread Dan Dorman

On 3/26/07, Nick Gleitzman <[EMAIL PROTECTED]> wrote:

I have to incorporate a couple of simple flowcharts into the content of
a site I'm building, I'm scratching my head about the best way to mark
up this info in a semantically meaningful way.


On 3/26/07, Joshua Street <[EMAIL PROTECTED]> wrote:

Flash would be a good way to produce accessible flowcharts (it lets
you re-use symbols, etc., so there is a sense in which it has more
inherent semantics than an image would) -- but it's not markup.

That's a simple flowchart, too -- anything slightly more recursive and
even the most horrifically nested [definition/ordered/unordered] list
wouldn't suffice to represent its meaning. And, remember, it's one
thing to create a technically-accurate solution, but quite another to
produce an accessible & generally sensible (usable) one.


I agree:  HTML doesn't readily lend itself to marking up flowcharts.
Rather than Flash, however, the task seems better suited to XML and/or
perhaps SVG.  A cursory Googlin' turned up [1], which might do the
trick, but of course you run into the already mentioned problem of
user agent support (the last "news" update at the site referenced was
3 August 2004).

Dan

1.  


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***