Re: [WSG] Stadards Site Section

2004-10-25 Thread Jeremy Keith
Mordechai Pellar wrote:
Very nice, though it would be even nicer were your JavaScript to be 
external.
Here's one way of doing that...
In your (X)HTML, assign a class of popup to any links that you want 
to open in a new window:

a href=foo.bar class=popuplink text/a
Then in a JavaScript file called from the head of the document:
function popUps() {
if (!document.getElementsByTagName) return false;

var lnks = document.getElementsByTagName('a');

for (var i=0;ilnks.length;i++) {

if (lnks[i].className == 'popup') {

lnks[i].onclick = function () {

window.open(this.getAttribute('href'),'popup');
return false;

}

lnks[i].onkeypress = lnks[i].onclick;
}
}
}
window.onload = popUps();
--
Jeremy Keith
a d a c t i o
http://adactio.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] Stadards Site Section

2004-10-25 Thread Chris Kennon
Hi,
So the most standards compliant method would be loading each portfolio 
piece into a new window without JS. So if this is the case, why have so 
many sites resorted to the carnival that is often JS, with window upon 
window soaking up screen real estate?

C
On Sunday, October 24, 2004, at 08:07 PM, Mordechai Peller wrote:
Patrick H. Lauke wrote:
Small modification: use popWindow(this.href) to refer back to the A 
element's HREF attribute. This way, if you change the href at some 
point, you won't have to remember to change the javascript as well, 
as it will automatically pick it up...
I had forgotten about that trick. Very nice, though it would be even 
nicer were your JavaScript to be external.
**
The discussion list for  http://webstandardsgroup.org/

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

Imagination is more important than knowledge.
-Albert Einstein

Chris Kennon
Principal
ckimedia (www.ckimedia.com)
ph: (619)429-3258
fax: (619)429-3258
e-mail: ([EMAIL PROTECTED])
Imagination is more important than knowledge.
-Albert Einstein

Chris Kennon
Principal
ckimedia (www.ckimedia.com)
ph: (619)429-3258
fax: (619)429-3258
e-mail: ([EMAIL PROTECTED])
**
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] Stadards Site Section

2004-10-25 Thread Patrick H. Lauke
Chris Kennon wrote:
So the most standards compliant method would be loading each portfolio 
piece into a new window without JS. So if this is the case, why have so 
many sites resorted to the carnival that is often JS, with window upon 
window soaking up screen real estate?
Simple answer: because most sites are not standards compliant...
Patrick H. Lauke
_
re·dux (adj.): brought back; returned. used postpositively
[latin : re-, re- + dux, leader; see duke.]
www.splintered.co.uk | www.photographia.co.uk
http://redux.deviantart.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] Stadards Site Section

2004-10-25 Thread Natalie Buxton
ALA has a fantastic article on creating accessible Popups - and I use
their method of calling content to the same window name for things
like portfolio pieces and larger images of product items.

It degrades very nicely if JS is disabled, and scales well. Loading
everything into the single window prevents that carnival you speak of.

http://www.alistapart.com/articles/popuplinks/


On Mon, 25 Oct 2004 16:00:30 -0700, Chris Kennon [EMAIL PROTECTED] wrote:
 Hi,
 
 So the most standards compliant method would be loading each portfolio
 piece into a new window without JS. So if this is the case, why have so
 many sites resorted to the carnival that is often JS, with window upon
 window soaking up screen real estate?
 
 C



-- 
Website Designer/Developer
www.nataliebuxton.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] Stadards Site Section

2004-10-25 Thread Jeremy Keith
Chris Kennon wrote:
So the most standards compliant method would be loading each portfolio 
piece into a new window without JS.
Perhaps I've misunderstood you here. Do you man the same window or a 
new window?

If you mean a new window then the only way you can do it without 
JavaScript is to use the target attribute. And you can only use that 
if you're using XHTML Transitional. If you are using XHTML Strict, then 
the target attribute is deprecated. And with good reason...

In the same way that old-school tags like font and attributes like 
bgcolor mixed presentation in with semantics, an attribute like 
target stirs a behavioural trigger into the mark-up. Semantically, 
target doesn't say anything about the link except how it should be 
handled by the browser... which is very presumptuous: it assumes not 
only that the page will be viewed in a web browser on a computer but 
also that the browser will have the technology to spawn new windows. 
That kind of behavioural instruction should be handled by JavaScript, 
leaving XHTML to mark-up the content semantically. Hence, the attribute 
is deprecated in XHTML Strict.

 So if this is the case, why have so many sites resorted to the 
carnival that is often JS, with window upon window soaking up screen 
real estate?
I'm not sure why you'd see a difference in screen real estate between 
windows spawned using target and windows spawned using JavaScript. As 
long as the window is named consistently (either with target or 
JavaScript), only one window is spawned and the content is updated. Or 
have I misunderstood? Did you mean the same window?

John Horner asked:
my question is, are we not allowed to use frames any more?
Sure, but again, you have to use the right doctype. In this case, XHTML 
Frameset.

Remember, there are three flavours of XHTML:
If you're going to use attributes like border, target and some 
other vestigial presentation/behaviour stuff, use the XHTML 
Transitional DTD:
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd

If you're going to use frames, use the XHTML Frameset DTD:
http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd
If you're going to mark-up your documents purely semantically (using 
CSS for *all* presentation and JavaScript for *all* behaviour), use the 
XHTML Strict DTD:
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd

... or, of course, you could use any one of the many HTML DTDs, all of 
which would allow for more flexibility in mixing and matching tags 
and attributes but at the price of dated mark-up that won't be 
future-proofed.
--
Jeremy Keith

a d a c t i o
http://adactio.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] Stadards Site Section

2004-10-25 Thread Chris Kennon
Hi,
Just what the was desired!
C
On Monday, October 25, 2004, at 04:30 PM, Natalie Buxton wrote:
ALA has a fantastic article on creating accessible Popups - and I use
their method of calling content to the same window name for things
like portfolio pieces and larger images of product items.
It degrades very nicely if JS is disabled, and scales well. Loading
everything into the single window prevents that carnival you speak of.
http://www.alistapart.com/articles/popuplinks/
On Mon, 25 Oct 2004 16:00:30 -0700, Chris Kennon [EMAIL PROTECTED] 
wrote:
Hi,
So the most standards compliant method would be loading each portfolio
piece into a new window without JS. So if this is the case, why have 
so
many sites resorted to the carnival that is often JS, with window upon
window soaking up screen real estate?

C

--
Website Designer/Developer
www.nataliebuxton.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
**

Imagination is more important than knowledge.
-Albert Einstein

Chris Kennon
Principal
ckimedia (www.ckimedia.com)
ph: (619)429-3258
fax: (619)429-3258
e-mail: ([EMAIL PROTECTED])
Imagination is more important than knowledge.
-Albert Einstein

Chris Kennon
Principal
ckimedia (www.ckimedia.com)
ph: (619)429-3258
fax: (619)429-3258
e-mail: ([EMAIL PROTECTED])
**
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] Stadards Site Section

2004-10-24 Thread Mordechai Peller
Chris Kennon wrote:
I dread the use of JS  pop up windows, but would like to keep the page 
count down, 
Besides being potentially inaccessible to those without JavaScript 
(unless done correctly) or XP SP2, and annoying to those where it does 
function (again, depending on how and where it's done), since each 
pop-up is a separate page, how does it  keep the page count down?
**
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] Stadards Site Section

2004-10-24 Thread Chris Kennon
Hi,
It doesn't keep page count down after thinking about it, can you direct 
me to the correct solution you alluded to.

C
On Saturday, October 23, 2004, at 11:30 PM, Mordechai Peller wrote:
Chris Kennon wrote:
I dread the use of JS  pop up windows, but would like to keep the 
page count down,
Besides being potentially inaccessible to those without JavaScript 
(unless done correctly) or XP SP2, and annoying to those where it does 
function (again, depending on how and where it's done), since each 
pop-up is a separate page, how does it  keep the page count down?
**
The discussion list for  http://webstandardsgroup.org/

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

Imagination is more important than knowledge.
-Albert Einstein

Chris Kennon
Principal
ckimedia (www.ckimedia.com)
ph: (619)429-3258
fax: (619)429-3258
e-mail: ([EMAIL PROTECTED])
**
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] Stadards Site Section

2004-10-24 Thread Mordechai Peller
Chris Kennon wrote:
It doesn't keep page count down after thinking about it, can you 
direct me to the correct solution you alluded to. 
First and foremost, start with a plain link: a 
href=http://other.domain.com/;Someplace else./a

Then, and only then, (if you must) assign to the node's onclick property 
the JavaScript version. (And don't forget to return false.)

A good article which you should read (which does talk about it, and 
more) is Unobtrusive JavaScript
http://www.onlinetools.org/articles/unobtrusivejavascript/index.html.
You should also check out some of the links given.
**
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] Stadards Site Section

2004-10-24 Thread Kevin Futter
Hi Chris,

The semi-accessible way of creating JavaScript pop-ups would go something
like this:

Create a js function called popWindow() or somesuch, with all the relevant
code to create your pop-up window. Your HTML code would then look something
like this:

a href=myWindow.html onclick=popWindow('myWindow.html'); return
false;Click here/a

This essentially creates the pop-up window if JavaScript is available, but
falls back to just loading the linked page in the same window if it isn't.

Cheers,
Kevin


On 25/10/04 6:18 AM, Chris Kennon [EMAIL PROTECTED] wrote:

 Hi,
 
 It doesn't keep page count down after thinking about it, can you direct
 me to the correct solution you alluded to.
 
 
 C
 On Saturday, October 23, 2004, at 11:30 PM, Mordechai Peller wrote:
 
 Chris Kennon wrote:
 
 I dread the use of JS  pop up windows, but would like to keep the
 page count down,
 
 Besides being potentially inaccessible to those without JavaScript
 (unless done correctly) or XP SP2, and annoying to those where it does
 function (again, depending on how and where it's done), since each
 pop-up is a separate page, how does it  keep the page count down?
 **
 The discussion list for  http://webstandardsgroup.org/
 
 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
 **
 
 
 Imagination is more important than knowledge.
 -Albert Einstein
 
 
 Chris Kennon
 Principal
 ckimedia (www.ckimedia.com)
 ph: (619)429-3258
 fax: (619)429-3258
 e-mail: ([EMAIL PROTECTED])
 
 **
 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
**



Re: [WSG] Stadards Site Section

2004-10-24 Thread Patrick H. Lauke
Kevin Futter wrote:
a href=myWindow.html onclick=popWindow('myWindow.html'); return
false;Click here/a
Small modification: use popWindow(this.href) to refer back to the A 
element's HREF attribute. This way, if you change the href at some 
point, you won't have to remember to change the javascript as well, as 
it will automatically pick it up...

Patrick H. Lauke
_
re·dux (adj.): brought back; returned. used postpositively
[latin : re-, re- + dux, leader; see duke.]
www.splintered.co.uk | www.photographia.co.uk
http://redux.deviantart.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] Stadards Site Section

2004-10-24 Thread Kevin Futter
On 25/10/04 12:13 PM, Patrick H. Lauke [EMAIL PROTECTED] wrote:

 Kevin Futter wrote:
 
 a href=myWindow.html onclick=popWindow('myWindow.html'); return
 false;Click here/a
 
 Small modification: use popWindow(this.href) to refer back to the A
 element's HREF attribute. This way, if you change the href at some
 point, you won't have to remember to change the javascript as well, as
 it will automatically pick it up...
 
 Patrick H. Lauke

Thanks Patrick - I wasn't aware of this trick. Nice one.

Kevin



**
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] Stadards Site Section

2004-10-24 Thread Mordechai Peller
Patrick H. Lauke wrote:
Small modification: use popWindow(this.href) to refer back to the A 
element's HREF attribute. This way, if you change the href at some 
point, you won't have to remember to change the javascript as well, as 
it will automatically pick it up...
I had forgotten about that trick. Very nice, though it would be even 
nicer were your JavaScript to be external.
**
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] Stadards Site Section

2004-10-23 Thread Chris Kennon
Hi,
Beginning the redesign for winter, the biggest issue is with creating a 
standards compliant portfolio section. I dread the use of JS  pop up 
windows, but would like to keep the page count down, what suggestions, 
or examples are on the menu?


Imagination is more important than knowledge.
-Albert Einstein

Chris Kennon
Principal
ckimedia (www.ckimedia.com)
p: (619)429-3258
f: (619)429-3258
e: ([EMAIL PROTECTED])
**
The discussion list for  http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**