Re: [WSG] web check

2007-02-13 Thread Ian Pouncey

Hi John,

Further to Tim's comments I think the JavaScript menu is a weak point. A
better solution would be to have the 'Members Name' and 'Type of Furniture'
options built in to the content in separate select boxes and then use
JavaScript to show one of them and hide the other.

The advantage to this is that users without JavaScript will still be able to
use the site as intended, and it will also cut down on your source code as
the arrays will not be necessary. The only change will be a slightly
different layout for non-JavaScript enabled users, and perhaps adjusting
your search code to cope with searches on both name and type at the same
time - as selecting a name essentially limits the search results to one, a
flag to show if this member makes that particular type of furniture or not
might do the trick.

Although it is not complicated, implementing this is a bit beyond the remit
of the WSG mailing list, so please feel free to contact me directly if you
would like some help.

Ian.


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

Re: [WSG] correct markup for frames? : was [target=_blank]

2006-08-15 Thread Ian Pouncey
Tony Crockford wrote:
 the framed pages have *no* doctype - what would make them strict? 
 and why, when they are part of a frameset would you try and validate 
 them against a strict DTD?

Why do the framed pages not have a doctype Tony? I can't see anywhere in the article you reference where this is stated.

If you look at
http://www.w3.org/TR/REC-html40/present/frames.html#h-16.3 you will see
that the example 'framed' document (init_dynamic.html) is given an HTML
4.01 Transitional doctype.

Whether it is an oversight in the spec or not it appears that target is
only valid for a transitional doctype even when used in a frameset.
This makes sense as there is nothing in the framed document that
explicitly states that it should only be viewed as part of a frameset.

I don't think this thread is going anywhere any more. Most, if not all,
the people on this list are probably never going to use another
frameset. If anyone does the answer is to use a transitional doctype
for documents other than the frameset itself.Ian

**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] Float Clearing Problem - First item clears sidebar???

2006-08-04 Thread Ian Pouncey
Richard Lake wrote: Help needed
 
 See http://www.pricklypair.co.nz/rocket1/products.php?dept=cakes
 
 All works well as long as the first product's height pushes it past the
 sidebar. Where this doesn't occur the second product doesn't start until
 after the sidebar. I've experienced this problem id IE6, FF1.5 and O8.5
 
 The structure is roughly
 
 Div product
  Floated Image
  Div product_text
  Table
  end Div product_text
  br clear both
 end Div product
 
 Css validates, HTML validates apart from some errors caused by PHP inserting
 hidden input fields outside the div.
 
 I've tried display: table-cell and that solves the clearing problem but the
 product div is only as wide as it needs to be.
 
 Can anyone suggest a solution?
 
 Thanks
 
 RichardSimple fix, but I've only tested in Firefox. Float the content right..content { color: #636363; margin: .75em 0 .75em .75em; float: right;}Ian.

**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] target=_blank

2006-07-25 Thread Ian Pouncey
 TuteC wrote:  Hello everyone. I have a web page that I use as a public favorites. I  have around a hundred different links to outside sites, and I use the  target=blank for each one. I searched at W3schools for a way to
  making all the links in the page target=blank with CSS but couldnĀ“t  find one. Is just that in a line of code I would save around 100s '  target=_blank '. 

  Do you know a way of doing it in a tidy way?Thierry Koblentz wrote: No hook needed: 
http://www.tjkdesign.com/articles/popup_window_with_no_extra_markup.asp
This is the same idea as the PPK code, as there is still a hook required - the wrapper element. Obviously this saves markup, especially as the wrapper is probably already in place but I think there is a case for giving each 'a' element a class or rel attribute. Think of it as metadata in your html saying that this anchor does not link to a page on the same site. This is valuable information, and I don't see it as cluttering up markup because it has a semantic purpose beyond what html elements without such attributes allow. The counter argument might be that external links will start with 'http' or other protocol, but I still think it has value.
With a long list of links I would go with Thierry's solution, but maybe modified slightly. Instead of hooking on to the wrapper id add a class to represent a list of external links. For smaller lists of links (maybe 5 items) I would mark each one up separately. In cases were some links are external and some are not then you don't have a choice - each external link needs a separate hook.
As said before though, triple check before you decide that a new window is the best option. Ian Pouncey wrote:  As a general rule, if you are opening a new window or loading anything   other than another HTML document (such as PDFs) make it as clear as 
  possible.Lachlan Hunt wrote: As a general rule, *never* attempt to open PDFs, Word documents, etc. in  new windows. Depending on the user's software or settings, this can  result in useless and annoying blank windows while the file is opened by 
 an external application, rather than embedded in the browser as it may  be on yours.I wasn't clear enough here - I am talking about new windows and PDFs as separate cases. I agree entirely with Lachlan that PDFs, Word documents, etc. shouldn't be opened in a new window, but I think they are another case were you should try and inform the user that something other than another html document loading in the same window is going to happen when they click on a link. Good ways to do this are with icons and title attributes on anchors.
There has just been a good discussion on whether PDFs should be opened in a new window. I think it would have to be a very special case for justifying it, but I can understand why people take the other approach in some situations.
Although I use _javascript_ on an almost daily basis I generally don't agree with using it to change basic browser functionality. There are reasons why browsers behave the way they do and in most cases they are good reasons. There are exceptions to every rule though and that is a topic on its own.




**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] target=_blank

2006-07-25 Thread Ian Pouncey
Ian Pouncey wrote:  This is the same idea as the PPK code, as there is still a hook  required - the wrapper element.Thierry Koblentz wrote: No, it is not required. Using a DIV as a hook is not for making the script work but to make sure
 we do not parse *every single link* in the document (i.e., there is a slight chance to find external URIs in the site navigation). The idea is to use the closer parent element that contains all of them (one
 that exists already)...The point is the scripts are basically the same - if you remove the class check from PPK's code it is the same as removing the check from the wrapper from your code. As I said I think which way around you make the check depends on the structure of your page. For Eugenio's original scenario which is a page just containing external links I totally agree that your code is cleaner.
Thierry Koblentz wrote:
 Using a class is a totally different story as it belongs to the presenational layer and I'd say not supposed to convey any information.Class isn't really presentational. It is to do with the structure of the document. In a crude way I see id as saying what an element is, and class saying what general purpose an element has 
i.e. classifying it. The DOM uses classes for _javascript_ just as legitimately as CSS. For this case rel might be more appropriate, and as Mike says you can define your own values for that attribute - though you should try and make them make sense when read by someone who hasn't seen your markup before.
I'm having a great time discussing this topic, this is the wonderful thing about the web standards community. I think most people have an opinion on how things should be done, yet the majority are willing to hear what other people have to say. Sometimes they agree, sometimes not, but I think everyone learns something.
Ian.

**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] target=_blank

2006-07-25 Thread Ian Pouncey




One last email at the risk of boring the rest of the list! I think it's
just down to you and I now Thierry.

Thierry Koblentz wrote:

  
Ian,
I'm not saying my approach is better or cleaner I'm just saying that it does
not work the way you describe it.
AFAIK, PPK is "tagging" the external links, isn't? He's looking for an
attribute (not a class BTW), but I'm only parsing the href value.
As I explained in my previous post, the use of "wrapper" is *irrelevant*.
  

Hey Thierry, I'm agreeing with you here. I can see how it works
(including the check for '://') and have used similar code myself. I
actually think your way is cleaner - and better in a lot of
circumstances.

I'm not really talking about the details of the code, my
point here is that there is a benefit to adding extra markup
(class, rel, type, whatever) beyond it being a _javascript_ hook. PPK is
a nice guy but I'm not here to defend his code! Both methods have their
place.

  
Class isn't really presentational. It is to do with the structure of
the document. In a crude way I see id as saying what an element is,
and class saying what general purpose an element has i.e. classifying
it.

  
  
I'm sorry but I have to strongly disagree on that one  ;)

According to http://www.w3.org/TR/html4/struct/global.html#h-7.5.2 
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.

The first is presentational, the second if for describing elements
beyond what information HTML alone can impart. That's the way I see it
anyway.



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