Email conversation
From | Joseph |
To | Me |
Subject | enhancements for your for listCollapse.js for your review |
Date | 22 April 2006 16:38 |
the problem i had with listCollapse.js are:
1) had to send a get query
2) had to reload page with new headers (complete reload) to get changed
query string
3) some extra variables which were not important were causing string
mismatches so the list was not properly expanding.
the changed file is on my site
[URL]/listCollapse.js
it changes the getRealAddress function [ renamed to compareRealAddress ]
to change the 'search' portion of the anchor tag into an array, done by
calling another function
parseQueryString
....
once it is in associative array form, it is looped through. It is
compared to the javascript variable " var two = phpPostStr;"
so, to use this change, the person has to write a server-side function
to create a combined GET + POST string.
my code is also online for that portion: see
[URL]/phpPostStr.phps
admittedly, that php code looks messy.
in the comparison loop, only those variables of importance from the
anchor tag are compared against all post/get variables. if they (or
atleast the important ones) match, then it is considered successful and
the script is expanded, color-coded, all that candy for that LI tag.
that was the purpose of the enhancements.
if you are interested, the code needs reorganized. my little hacks of
this and that can be pulled out into arrays and matches made in a
function nicely called inside another function, making it easier to
implement: "user needs just supply the variables like this ..." kind of
thing ....
finally, it is live? yes.
[URL]
almost all the links on the left use your javascript library, so yuo can
and should also push some rss links at least to get a feel.
if i can assist you in any way, please let me know.
joseph, seoul, s. korea
From | Me |
To | Joseph |
Subject | Re: enhancements for your for listCollapse.js for your review |
Date | 24 April 2006 11:33 |
Joseph,
From the look of it, you are using a variable string instead of the location
check in order to say what branch to expand.
This idea looks useful, and I may consider adding it, though I am sure it
must be possible without such drastic changes ;)
> the changed file is on my site
> [URL]/listCollapse.js
Please note that my license terms of use require you to keep all of my
comments in the file, so I must ask you to put the comments that you have
removed back again, with suitable modifications saying which parts you
changed and why.
> so, to use this change, the person has to write a server-side function
> to create a combined GET + POST string.
Of course, this part rules out me using these parts of your code. I cannot
have a script that relies on server side processing when older versions of
the script did not. But I will see what functionality I can add without this
requirement, since it looks like something people will find useful.
Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/