Solved

Is it possibe to preserve a flex tree component position with a client session using php or an alternative.

Posted on 2008-06-25
4
319 Views
Last Modified: 2010-04-21
I have a flex tree component I am using as a menu to find specific products.  When the user double clicks their desired product they leave that page and they view the chosen products.  What I would like to happen is as long as their current session is active and they navigate back to the categories page the tree will stay in the position it was before they left rather than going back to it's default position.  The tree is being used with a php e-commerce driven site and all the shopping cart details are stored using the current session.  I have thought about making a pop up window instead so they root page stays on the tree, but I do not care for that. I would rather the position stay fixed until you close the session.
0
Comment
Question by:aduvall
  • 3
4 Comments
 
LVL 20

Accepted Solution

by:
virmaior earned 500 total points
ID: 21868420
well depending on what  you mean, there are different solutions:

(1) if you are okay with URL staying the same, then you can use IFRAMES or FRAMES to do this.  Just have the menu target the other frame, and it will remain the same while the content switches.


(2) if you want the URL bar to change, then the navigation bar will need to be restored every time.  you will need to store the current postions / open and closed information in a cookie in the browser (via javascript).  And then reset its position after it loads.


a good illustration of the complexity of  this problem is MSDN's website.
0
 

Author Comment

by:aduvall
ID: 21869918
I am thinking that the cookie would be the way to go because when a user selects a certain item in the tree it will send them to a new page with the results of the query.  Could you direct me to any code examples?
0
 

Author Comment

by:aduvall
ID: 21887665
I decided to use iframes and it worked rather well. Still searching for a example of storing the current postions / open and closed information in a cookie in the browser (via javascript).
0
 

Author Closing Comment

by:aduvall
ID: 31470663
Thank You for the help.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Read about how to choose the best possible content marketing agency to suit your needs. Content marketing has become an integral part of running a successful tech business, so it is wise to be informed.
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question