Email conversation
From | James Rands |
To | Me |
Subject | List Collapse Code Expansion Needed ASAP |
Date | 9 September 2004 14:07 |
Hi, I've come across your site and have experimented with the code
available on the link below.
http://www.howtocreate.co.uk/tutorials/jsexamples/listCollapseExample.html
Although this scipting technique is really good, I have an issue in regard
to keeping the navigation expanded when you load a page from a link
reference.
While I wait for a response from you I'm going to try and expand on the JS
code to write a session cookie function to remember what should be open or
not when a link is hit and the page reloads.
Hope to hear from you soon
Regards
James
From | Me |
To | James Rands |
Subject | Re: List Collapse Code Expansion Needed ASAP |
Date | 9 September 2004 14:50 |
James,
I'm afraid that is a limitation with this script, as it says on the page
'It also collapses all branches first, none can be left open by default
like they can with the collapsible list script.'. While I'm sure it is
possible, I do not really have the time to write this functionality into
the script at the moment.
If you want to write it, you are welcome to. I would recommend that you
start _after_ the list has been collapsed, and then expand the required
branches again, by simulating clicks on the links: blah.onclick();
Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
From | James Rands |
To | Me |
Subject | Re: List Collapse Code Expansion Needed ASAP |
Date | 9 September 2004 15:27 |
Mark, thanks for the quick response to this - I realise now that you're
busy, but are you available for advice via email on this in the near future.
I'd like to nail this by close of UK play tomorrow so any further help is
much appreciated. If I arrange a budget for the additional functionality
could you find time to help me? Please let me know who much you'd require
to complete the additional work.
Regards
James
From | James Rands |
To | Me |
Subject | Re: List Collapse Code Expansion Needed ASAP |
Date | 10 September 2004 14:09 |
Thanks, got this working sweet, however I still have one remaining question,
how do I apply page links to expanding node ref's eg I've tried wrapping a
link around but no joy - is there something I can do to alter the JS file?
<ul>
<li>i need this to be a link and expand the structure when clicked
<ul>
<li><a href="1.html">Chapter 1</a></li>
[ ... etc ... ]
Cheers
James
From | Me |
To | James Rands |
Subject | Re: List Collapse Code Expansion Needed ASAP |
Date | 10 September 2004 14:23 |
The script does support links in the branches,
<li><a href="whatever">Chapter 3</a>
<ul> etc.
but you must not use the display:block; style for links, or the ± sign and
the link appear on separate lines (you could use the inline-block style,
but Mozilla and IE do not support it).
It will end up with a ± sign to expand/contract, and whatever link you put
as the link to the other page.
From | James Rands |
To | Me |
Subject | Re: List Collapse Code Expansion Needed ASAP |
Date | 10 September 2004 15:42 |
Hi, I'm still getting 2 lines, 1 for the +/- link and another for the
actual page link?
Here's the code.
...
li a {
...
width: 100%;
...
}
Thanks for your time,
James
From | Me |
To | James Rands |
Subject | Re: List Collapse Code Expansion Needed ASAP |
Date | 10 September 2004 15:59 |
oops, yeah, IE (and I seem to remember a couple of others) will treat
width: 100% as if it were display: block. you will need to remove that as
well.