RE: [WSG] Learning The DOM

2005-07-19 Thread Chris Taylor
Jeremy,

 How much JavaScript do you know?

Enough to get myself in trouble! Reading Stuarts' book has enlightened
me to loads of really useful things, but I realise that as far as
scripting languages go (compared to, say, PHP or VBScript) I am just
scraping the surface of JavaScript.

 What kind of things about DOM Scripting need clarifying?

Reinforcement of unobtrusive techniques, including best practices and
standard code snippets. I'd like to see some more stuff about
bullet-proofing scripts as well, particularly when it comes to slower
computers and click-happy users.

 Do you want to see examples of cool stuff with a kind of DOM
Scripting for dummies style explanation or more sober articles with a
more geeky leaning?

Bit of both, really. DOM Scripting has a fairly high built-in cool
quotient, just because it makes things happen on the page. But learning
why and how something works, not just what it does and how to copy it,
is the key to becoming proficient in any area of development.

 Please share your personal experiences: what's your skill level with
JavaScript compared to say, CSS or XHTML? What's your opinion of
JavaScript?

Compared to (X)HTML and CSS I'm not really very adept at JavaScript,
however the few things I've done so far have been a lot easier to
complete than I thought they would be. My opinion of JavaScript: the
best days are yet to come.

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
**



Re: [WSG] using scalable vector graphics

2005-07-19 Thread Ben Ward
Yes, fallback content can be a normal img / element with a fallback
bitmap image, and further fallback alt-text.

To make the width dynamic you need to do two things. 
  1) Your SVG image mustn't declare a fixed width in itself
  2) You need to do the sizing with CSS.

My preferred way is to place the object in a container (which you have
to do anyway) and use CSS to make the object size to width: 100%.
Then, no-matter what size your container is, the object should resize
smoothly.

I have a crude example at home which I'll post for you later on.

Ben

On 7/19/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Ben Ward wrote:
  Use the object tag, just like we do with Flash. The SVG mimetype
  (type atrribute) is image/svg+xml so you'd have something like:
 
  object type=image/svg+xml data=image.svg
!-- fallback content --
  /object
 
 would the fall back content maybe be a jpg, gif or png of the svg image?
 
 
  You can add width and heigh into that if you need to (though that
  rather defeats the purpose of using vector graphics). No embed tags
  needed at all. I can't fathom why you've been advised to use embed
  at all, I must say.
 
 when i googled the question, adobe support was one hit and they said in
 their explanation to embed the graphic in the html.
 
 if i wanted to use this image as a background image to fit the viewport
 or container, regardless of the users resolution, how would i do this?
 
 dwain
 
 
 
 --
 Dwain Alford
 [EMAIL PROTECTED]
 http://www.alforddesigngroup.com
 
 The artist may use any form which his expression demands;
 for his inner impulse must find suitable expression.
 Wassily Kandinsky, Concerning The Spiritual In Art
 **
 The discussion list for  http://webstandardsgroup.org/
 
  See http://webstandardsgroup.org/mail/guidelines.cfm
  for some hints on posting to the list  getting help
 **
 
 


-- 
http://ben-ward.co.uk
**
The discussion list for  http://webstandardsgroup.org/

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



RE: [WSG] nth child rule

2005-07-19 Thread Drake, Ted C.
Thanks for the answer. I didn't find the nth:child resource.
Ted


 


On 19 Jul 2005, at 1:56 am, Drake, Ted C. wrote:

 Here's my question, are there special rules for using nth-child pseudo
 classes?  Beyond first, second, third, ... what are the labels? Sixth,
 seventh, tenth?  That is what I would assume.

 Here's the prototype: http://www.tdrake.net/joan/index-liquid.html

There is no such thing as 'third-child' and so one. Only ':first-child' 
(support: Gecko, Safari, Opera, iCab), :last-child (Gecko, partly in 
Safari) and :nth-child (no web browser supports this, currently).

http://www.w3.org/TR/CSS21/selector.html#first-child
http://www.w3.org/TR/css3-selectors/#nth-child-pseudo

Philippe
---
Philippe Wittenbergh
http://emps.l-c-n.com/
 
**
The discussion list for  http://webstandardsgroup.org/

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



Re: [WSG] Learning The DOM

2005-07-19 Thread Ben Curtis


And now, I'd like to turn the question around and ask everyone on  
this list what they'd like to see from the DSTF.


How much JavaScript do you know?


Quite a bit. I helped beta some of the LiveScript engine the  
Netscape boys whipped up in 95. Sadly, I was stuck in a be  
compatible with Netscape 4 environment for far too long and now have  
some severe DOM deficiencies.




What kind of things about DOM Scripting need clarifying?


There's a bunch of stuff out there along the lines of use this  
script to do X.
There's some stuff about I've just made this standard way of doing  
things that solves a bunch of problems.
There's also a bunch of stuff about here's a mega-library that  
solves all your monster DOM/AJAX/Web application problems.


There's very little about growing, as a programmer/problem solver,  
from the using and hacking of found scripts, to architecting large  
organizational solutions. For example, most Unobtrusive examples end  
with this line to get things going:


window.onload = init;

For all the effort that goes into an Unobtrusive script to make it  
play nice with the HTML and CSS, this one line essentially declares  
There shalt not be any Other Script before Me. Beginners try to  
stitch two of these in the same page, and it fails and they think  
they broke it. If beginners are going to become advanced, they need  
to know more than code; they need to learn how to stitch scripts  
together to make systems, and systems to make applications. It's that  
mentality, that potential for hugeness in every minor script, that  
needs more support in more tutorials.


I *don't* think this means we need another here's the architecture I  
use presentation -- I would cringe at the notion of an official,  
WaSP-authorized standard. Learning to think about architecture is  
different than using someone's pre-developed one. We need to teach  
the beginners how to think differently. Without that, DOM is just  
another set of methods to memorize.



Do you want to see examples of cool stuff with a kind of DOM  
Scripting for dummies style explanation or more sober articles  
with a more geeky leaning?


There may be a place for a For Dummies approach for the topic, but  
in my experience such approaches get the complete n00b going just far  
enough that they realize what they need to learn and they move on.  
Cool stuff is what gets the word out (e.g., techniques and articles  
cited in this very list), but I think the level of the learner should  
be assumed to be higher than that.



Please share your personal experiences: what's your skill level  
with JavaScript compared to say, CSS or XHTML? What's your opinion  
of JavaScript?


I run a team of coders who do all that stuff, and I'm their reference  
for getting it all to play nicely. To me, the separate languages are  
more than separating presentation, structural content, and behavior;  
it's about giving my team the tools to do their jobs without stepping  
on each other's toes. I see the three languages just starting to  
learn the steps of a very cool dance.



Feel free to contact me off-list, if you wish to chat more.

--

Ben Curtis : webwright
bivia : a personal web studio
http://www.bivia.com
v: (818) 507-6613




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

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



Re: [WSG] Body tag background color changes

2005-07-19 Thread Ben Curtis


On Jul 18, 2005, at 7:16 PM, Bert Doorn wrote:


Just wondering whether there was a way to include different body
background colors (for different pages) within the same css file.
For example #fff for page1.html, #ffc for page2.html etc.


If every page has to have a different background colour, you could  
put an ID on the body element, then in your css:

...
If there's a few different backgrounds but they are used on a  
number of pages, use a class instead of id.



This is a good habit, IMO, although technically the body tag is  
unique on the page and so many pages on the site can have a body tag  
with the same id -- IDs need only be unique per document. There are  
two reasons it's still useful (AFAICS) to make body IDs unique on the  
site, and classes non-unique:


1. You may be coding in XHTML, which may give you the ability in the  
future to do something entirely wacky like dump every page in your  
site into a single XML file. Then you'd want your XPath query to be  
able to home right in on a single body element.


2. Class attributes are a space-delimited list, allowing you to stack  
up the categories the body belongs to. I use this technique to define  
a range of layout types, which may be content- or section-specific,  
like so:


body id=pageBioPubIntphoto class=sectionBio sectionPub  
layoutText


The page___ and section___ identifiers are derived directly from  
the path, and the layoutText class in this case sets black text on  
white background (the layoutPic is mostly pictures, with a black  
background and subordinated grayish text).



With this technique, you can do more than change the background per  
page, section, or layout type. You can also, for example, set  
specific dynamic submenus to appear or hide, or layouts with the same  
IDs can be radically shifted.


--

Ben Curtis : webwright
bivia : a personal web studio
http://www.bivia.com
v: (818) 507-6613




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

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



RE: [WSG] Body tag background color changes

2005-07-19 Thread Drake, Ted C.
I have to agree about using body class instead of id.
Here's what I'm using on one page
body class=sub3 sub3sub1 sub3sub1sub4 asub3sub1sub4

This set of classes match with a set of id's in a nested list that is used
for navigation. This has allowed me to open, close, change background
colors, add icons to show that a parent list is open for children, etc. 

You can use multiple classes but multiple id's in a tag can create problems.

For more info on this, I sent the entire css sheet to this mailing list a
couple months ago, it's probably in the archive under when navigation lists
go bad or some silly name like that.

Ted


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Ben Curtis
Sent: Tuesday, July 19, 2005 10:23 AM
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] Body tag background color changes


On Jul 18, 2005, at 7:16 PM, Bert Doorn wrote:

 Just wondering whether there was a way to include different body
 background colors (for different pages) within the same css file.
 For example #fff for page1.html, #ffc for page2.html etc.

 If every page has to have a different background colour, you could  
 put an ID on the body element, then in your css:
...
 If there's a few different backgrounds but they are used on a  
 number of pages, use a class instead of id.


This is a good habit, IMO, although technically the body tag is  
unique on the page and so many pages on the site can have a body tag  
with the same id -- IDs need only be unique per document. There are  
two reasons it's still useful (AFAICS) to make body IDs unique on the  
site, and classes non-unique:

1. You may be coding in XHTML, which may give you the ability in the  
future to do something entirely wacky like dump every page in your  
site into a single XML file. Then you'd want your XPath query to be  
able to home right in on a single body element.

2. Class attributes are a space-delimited list, allowing you to stack  
up the categories the body belongs to. I use this technique to define  
a range of layout types, which may be content- or section-specific,  
like so:

 body id=pageBioPubIntphoto class=sectionBio sectionPub  
layoutText

The page___ and section___ identifiers are derived directly from  
the path, and the layoutText class in this case sets black text on  
white background (the layoutPic is mostly pictures, with a black  
background and subordinated grayish text).


With this technique, you can do more than change the background per  
page, section, or layout type. You can also, for example, set  
specific dynamic submenus to appear or hide, or layouts with the same  
IDs can be radically shifted.

-- 

 Ben Curtis : webwright
 bivia : a personal web studio
 http://www.bivia.com
 v: (818) 507-6613




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

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

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



[WSG] World Usability Day November 3, 2005

2005-07-19 Thread Chris Dimmock
World Usability Day, on November 3, 2005 is designed to promote the
fields of usability engineering and user-centered design.

More info:

http://www.worldusabilityday.net/about 

Chris Dimmock

Cogentis Internet Marketing
www.cogentis.com.au
**
The discussion list for  http://webstandardsgroup.org/

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



RE: [WSG] Body tag background color changes

2005-07-19 Thread John Horner
For the record, I believe there's a bug in IE5 for Mac which will 
cause problems with the


body class=foo

method. I've certainly seen some strange background behaviour on a 
website where this method was used which only came up in IE5 Mac, but 
I haven't got time to test at the moment.


   Have You Validated Your Code?
John Horner(+612 / 02) 8333 3488
Developer, ABC Kids Onlinehttp://www.abc.net.au/

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

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



Re: [WSG] Body tag background color changes

2005-07-19 Thread russ - maxdesign
John,
I built and tested a mini demo a while ago and it had no issues that I
recall. Just checked again now in Mac IE5 and there are no issues - though
it uses ID rather than class:
http://www.maxdesign.com.au/presentation/page-id/index.htm

Russ


 For the record, I believe there's a bug in IE5 for Mac which will
 cause problems with the
 
body class=foo
 
 method. I've certainly seen some strange background behaviour on a
 website where this method was used which only came up in IE5 Mac, but
 I haven't got time to test at the moment.

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

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



Re: [WSG] Body tag background color changes

2005-07-19 Thread Philippe Wittenbergh


On 20 Jul 2005, at 11:55 am, russ - maxdesign wrote:


John,
I built and tested a mini demo a while ago and it had no issues that I
recall. Just checked again now in Mac IE5 and there are no issues - 
though

it uses ID rather than class:
http://www.maxdesign.com.au/presentation/page-id/index.htm

Russ



For the record, I believe there's a bug in IE5 for Mac which will
cause problems with the

   body class=foo

method. I've certainly seen some strange background behaviour on a
website where this method was used which only came up in IE5 Mac, but
I haven't got time to test at the moment.



John is referring to this bug in IE Mac
http://www.macedition.com/cb/ie5macbugs/#whitespace
which is about the use of multiple classnames with the same substring 
in their name.



Philippe
---
Philippe Wittenbergh
http://emps.l-c-n.com/

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

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