Saving css state in javascript and passing to php via form submit



Hello all,

I have a little dilemna here:

I am using php/css/mysql to generate a hierarchical table of categories and
sub-categories and sub-sub.. Etc..

A screenshot can be found here:

http://www.internet46.fr/mehim/screenshot.jpg

Now i'm also using javascript to hide show blocks of divs to hide/show sub
categories.. Typical..

My issue is on page reload, i have a form on the same page, when a category
is clicked, the categorie info displays and you can update the info through
this form (table and form on same page). My issue comes when i post the
data, the page comes back and my category tree folds up which is normal
because all divs are set to "display:none;".

I have managed to pass a post/get called lastclicked that gets the nodepath
of that element and combined with php to generate javascript that will
unfold the tree and highlight the last clicked element...

I would like to go one step further and save the entire state of the tree,
say several parent categories are unfolded and i click a subcategorie to
display my form, i want that entire "state" un unfolded categories to be
displayed not just the clicked category, of course i can get this state and
save it in a javascript array, but my issue is when i post my form how do i
pass that state data generated by javascript back to the page, to be able to
unfold the tree in the state it was previously?

What are the technologies IF there are any and what should i look up to find
docs that cover this type of datatransfer ie: javascript->php.

Regards,

Tim
.



Relevant Pages

  • Re: [PHP] Saving css state in javascript and passing to php via form submit
    ... Now i'm also using javascript to hide show blocks of divs to hide/show sub ... unfold the tree and highlight the last clicked element... ... display my form, i want that entire "state" un unfolded categories to be ...
    (php.general)
  • Re: Value not gettin gwrittne to the DOM.
    ... And the paratmeter 'actionNameEnc'(or the form input name) need to be ... I am a newbie to javascript. ... Iam working on a page that has two radio buttons and a tree. ... for actions of tree collapse or tree expand get sent to the server from ...
    (comp.lang.javascript)
  • Re: Value not gettin gwrittne to the DOM.
    ... And the paratmeter 'actionNameEnc'(or the form input name) need to be ... I am a newbie to javascript. ... Iam working on a page that has two radio buttons and a tree. ... for actions of tree collapse or tree expand get sent to the server from ...
    (comp.lang.javascript)
  • Re: Value not gettin gwrittne to the DOM.
    ... I am a newbie to javascript. ... Iam working on a page that has two radio buttons and a tree. ... for actions of tree collapse or tree expand get sent to the server from ...
    (comp.lang.javascript)
  • Value not gettin gwrittne to the DOM.
    ... I am a newbie to javascript. ... Iam working on a page that has two radio buttons and a tree. ... for actions of tree collapse or tree expand get sent to the server from ...
    (comp.lang.javascript)