Sean Kerwick

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromSean Kerwick
ToMe
SubjectNested list collapsing script - selfLink and Raymond Martens' changes
Date13 November 2006 20:34
Mark,

I love your scripts!  The thought and dedication you put into them has
been astounding!

I am noticing one problem with Raymond Martens' changes to the script.
When using them and the selfLink function, the graphics for the thread
opened containing the current page link are reversed (open thread with +
graphics).

Can you think of an easy way to reverse this?  As a side note in case
it's the cause, but I do not think it's affecting the functionality, I
am using a list with every item having an URL associated with it.

Sean Kerwick
FromMe
ToSean Kerwick
SubjectRe: Nested list collapsing script - selfLink and Raymond Martens' changes
Date14 November 2006 11:41
Sean,

> I am noticing one problem with Raymond Martens' changes to the script.
> When using them and the selfLink function, the graphics for the thread
> opened containing the current page link are reversed (open thread with +
> graphics).

Raymond's approach is a hack that works well under normal conditions only.
It relies on detecting mouse events on the images. It therefore also fails
completely if you use keyboard or voice commands instead of a mouse.

If you need it to work, I _think_ that you can fix it in the stateToFromStr
function by changing this:

l[x].parentNode.getElementsByTagName('a')[0].onclick();

to this:

l[x].parentNode.getElementsByTagName('a')[0].onclick();
l[x].parentNode.getElementsByTagName('a')[0].firstChild.onclick();

But I must admit that I have not tested it.


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
FromSean Kerwick
ToMe
SubjectRe: Nested list collapsing script - selfLink and Raymond Martens' changes
Date14 November 2006 14:08
Tarquin,

Thank you for your quick response!

Your scripts are some of the cleanest I have seen in over ten years of
Web page development.

Your suggestion does seem to have corrected the problem. You sure know
your script inside and out!

The hack seems to work _once_ if the open/close link is tabbed to and
then enter is pressed. I was wondering if a possible change to the
clickSmack or compactChildren function might make this fully functional,
so I may work on that today.  I'd appreciate your thoughts on it.

The list is working exceptionally well with a XML/XSL combination I am
using to create it.  If I can just hammer out the selfLink with changing
graphics, also being accessible, I'll be set.

Sean Kerwick
FromMe
ToSean Kerwick
SubjectRe: Nested list collapsing script - selfLink and Raymond Martens' changes
Date15 November 2006 17:00
Sean,

> I was wondering if a possible change to the
> clickSmack or compactChildren function might make this fully functional,
> so I may work on that today.

I could never get it to work cleanly myself (which is why it is not an
option in my original script), so I am afraid I have no advice,
unfortunately.

Tarquin.
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.