Re: [WSG] Article: DL + DOM = "cool" FAQ page

2006-02-01 Thread Thierry Koblentz
Al Sparber wrote:
>> Is it something I should know about Safari and the method used here?
>
> I'm not sure except that createElement is kind of fashionable but
> document.write is *much* more straightforward ;-)

I agree, but the DOM police scares me...
;-)

Thierry | www.TJKDesign.com (wondering why his posts show up with so much
time delay on this list)


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

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



Safari issue SOLVED! - was Re: [WSG] Article: DL + DOM = "cool" FAQ page

2006-02-01 Thread Thierry Koblentz
It seems that adding the "rel" attribute to the "link" element through the
DOM makes Safari go ballistic.

Using the "style" element instead appears to do the trick. A new version of
the script should be uploaded later today.

Regards,
Thierry | www.TJKDesign.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] Article: DL + DOM = "cool" FAQ page

2006-02-01 Thread Thierry Koblentz
Stephen Stagg wrote:
> Is it just me, or does this example NOT work at all with safari? The
> technique may be the dog's wotsits but the page is just blank in
> Safari.

You're right, I get a blank page in Safari. Very weird.
I know it worked with the previous version (using document.wrtie()), but the
following approach seems to create a problem in this browser:

if (document.getElementsByTagName && document.createElement){
var zStyles =
document.getElementsByTagName('head')[0].appendChild(document.createElement(
'link'))zStyles.href = '/TJK_ToggleDL/TJK_ToggleDL.css';
zStyles.type = 'text/css';
zStyles.rel = 'stylesheet';
}

Is it something I should know about Safari and the method used here?

Regards,
Thierry | www.TJKDesign.com

> On 1 Feb 2006, at 17:58, Thierry Koblentz wrote:
>
>> The advantages of this solution:
>> - It uses semantic markup.
>> - It degrades nicely (hidden elements are visible in script-disabled
>> UAs).
>> - DTs do not appear as links without script support.
>> - It does not use inline event attribute (onclick()).
>> - It does not require "A" elements in the markup.
>> - It is screen-readers "friendly".
>> - It is IE Mac compatible.
>> - It relies on one single hook.
>>
>> http://www.tjkdesign.com/articles/toggle_elements.asp
>>
>> Please report errors/problems/etc..
>>
>> Regards,
>> Thierry | www.TJKDesign.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
>> **
>>
>
> **
> 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] Article: DL + DOM = "cool" FAQ page

2006-02-01 Thread Thierry Koblentz
Stephen Stagg wrote:
> Is it just me, or does this example NOT work at all with safari? The
> technique may be the dog's wotsits but the page is just blank in
> Safari.

Safari chokes on the way I set the attributes. I'll update the script to
take care of the issue.
Thanks a lot for your feedback.

Thierry | www.TJKDesign.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] Article: DL + DOM = "cool" FAQ page

2006-02-01 Thread Al Sparber

Thierry Koblentz wrote:

Stephen Stagg wrote:
Is it just me, or does this example NOT work at all with safari? 
The

technique may be the dog's wotsits but the page is just blank in
Safari.


You're right, I get a blank page in Safari. Very weird.
I know it worked with the previous version (using document.wrtie()),
but the following approach seems to create a problem in this 
browser:


if (document.getElementsByTagName && document.createElement){
var zStyles =
document.getElementsByTagName('head')[0].appendChild(document.createElement(
'link'))zStyles.href = '/TJK_ToggleDL/TJK_ToggleDL.css';
zStyles.type = 'text/css';
zStyles.rel = 'stylesheet';
}

Is it something I should know about Safari and the method used here?


I'm not sure except that createElement is kind of fashionable but 
document.write is *much* more straightforward ;-)


--
Al Sparber
PVII
http://www.projectseven.com

"Designing with CSS is sometimes like barreling down a crumbling 
mountain road at 90 miles per hour secure in the knowledge that 
repairs are scheduled for next Tuesday".






**
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] Article: DL + DOM = "cool" FAQ page

2006-02-01 Thread Al Sparber

Stephen Stagg wrote:

Is it just me, or does this example NOT work at all with safari? The
technique may be the dog's wotsits but the page is just blank in
Safari.


Hmm. You're right. All I see is a blank page in Safari (Panther).

--
Al Sparber
PVII
http://www.projectseven.com

"Designing with CSS is sometimes like barreling down a crumbling 
mountain road at 90 miles per hour secure in the knowledge that 
repairs are scheduled for next Tuesday".







**
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] Article: DL + DOM = "cool" FAQ page

2006-02-01 Thread Stephen Stagg
Is it just me, or does this example NOT work at all with safari? The  
technique may be the dog's wotsits but the page is just blank in Safari.


Stephen

On 1 Feb 2006, at 17:58, Thierry Koblentz wrote:


The advantages of this solution:
- It uses semantic markup.
- It degrades nicely (hidden elements are visible in script-disabled
UAs).
- DTs do not appear as links without script support.
- It does not use inline event attribute (onclick()).
- It does not require "A" elements in the markup.
- It is screen-readers "friendly".
- It is IE Mac compatible.
- It relies on one single hook.

http://www.tjkdesign.com/articles/toggle_elements.asp

Please report errors/problems/etc..

Regards,
Thierry | www.TJKDesign.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
**



**
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] Article: DL + DOM = "cool" FAQ page

2006-02-01 Thread Ted Drake
Nice work Thierry.
I'm going to add this one to the library.

I know there are plenty of hide/show examples out there. This one has a nice
combination of clean code and attention to accessibility.
Ted


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Thierry Koblentz
Sent: Wednesday, February 01, 2006 9:58 AM
To: wsg@webstandardsgroup.org
Subject: [WSG] Article: DL + DOM = "cool" FAQ page

The advantages of this solution:
- It uses semantic markup.
- It degrades nicely (hidden elements are visible in script-disabled
UAs).
- DTs do not appear as links without script support.
- It does not use inline event attribute (onclick()).
- It does not require "A" elements in the markup.
- It is screen-readers "friendly".
- It is IE Mac compatible.
- It relies on one single hook.

http://www.tjkdesign.com/articles/toggle_elements.asp

Please report errors/problems/etc..

Regards,
Thierry | www.TJKDesign.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
**


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

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