How to implement a Chained menu in PHP? - ajax

I want to have a AJAX Function of implementing a chained menu + a result table.
What i need to do:
Firstly, the page populate automatically a vertical menu from MySQL and a result table.
Secondly, when i click an item in the menu, it displays a submenu in a fixed area in the page and a new result table.
Thirdly, when i click an item in the submenu, it displays a sub-submenu in another fixed area in this page and a new result table.
Last, when i click an item in the sub-submenu, it displays a result table.
All the result tables are in the same position. It changes depending on the click in the menus.
I'm lost in how to do that. Do you any ideas about how to implement this? Thanks so much.
Edit:
The effect is a little like this: effect

Your First, Second, Third, Last very much looks like visualjquery.com
I believe it is written in Javascript+jQuery, so you could learn from its source.

Related

MS Access trying to link a record with a page tab

I've been searching for a few days and doing every word combination I can think of to try to find the answer to my issue. I'm hoping someone can help me.
Before I begin I'd also like to say I'm very new to Access and admittedly not great with it. I'm still learning so this could be a very easy fix or I may have messed up beyond belief.
The issue I'm having is I've setup several page tab on a form and entered all the information for my records. However I cannot get the page tabs to pull up the corresponding records. Instead I have to either search through the records which doesn't always work or I have to arrow to the right record after selecting the tab I want. I'd like it so that when I click the tab it brings up the proper record automatically. If someone can point out where I'm going wrong and how to fix it I would greatly appreciate it. See below for some pics of what I mean.
As you can see in the first image. The tab name "Auto PLUS" doesn't bring up the proper record. instead I have to manually change the record using the arrows at the bottom of the form (see the arrow at the bottom of the image) in order to change the record. I need the record and the tab to match. Any help would be so greatly appreciated.
Thanks in advance for any help!!
-Deke
Assuming your form is bound (if in design mode your fields do NOT say "Unbound" then your form is bound), you simply need to add some VBA code to each tab's OnClick event.
Enter design mode and select the first tab "Claims Other". Open the properties pane, click the event tab, and click the ellipsis at the end of the OnClick line. When prompted, select "Code Builder" and it should launch the Visual Basic Editor.
It will put your cursor automatically in the correct position. Copy/Paste:
DoCmd.GoToRecord acDataForm, Form1, acGoTo, 1
The 1 should correspond to "Claims Other's" proper record in your table. Use the row number, not the ID number to determine what it should be.
Go back to Form View and click on the "Claims Other's" tab. The data should show the corresponding record in your table.
Repeat the steps of adding events to each tab, finding the relevant record in your table, and replacing the 1 from the above code.

Primefaces selectManyMenu: Showing selected items on top of list

I'm using Primefaces' selectManyMenu to display a list of hundreds of items. I've also included a filter on top. The issue is that when I select, say, the 200th item in the list, I have to manually scroll down to the 200th item each time to see if it has been checked.
I want it so that whenever I select an item, it moves to the top of the menu, so that it is easy to view all the selected items from that list at the top without having to scroll down and up all the time.
Any suggestions?
Looks like your component is getting updated when selecting or unselecting an item, and that's the reason you're reloading the list and losing your scroll position.
Else, it looks like you could use a workround for this. Something like
Catch the select/unselect/change event and trigger a backing Bean function where
You rearrange you list of items sot that the selected ones will be pushed first
oncomplete, you will update your selectManyMenu component.
By the way, maybe it's time to think again if you're using the right component and UX practice. and I have the impression that selectManyMenu is not meant to be used with lists of 200+ items. Personally I think you should avoid using a list that will have to scroll down, for selectMany components. For example you could use another component like a pickList

How to know when NSTableView is done (re)loading its contents?

I have a UI that looks similar to the mail app. A table view along the left with a single column of items. When one of the those items on the left is selected, details about that item are shown on the right.
When some event occurs in my app that requires the data in the left table view to be reloaded, the current selection is lost and then the right detail view and left master view get out of sync.
The way i hoped to solve this problem was, when it was time to reload the table data, I would:
1. Save the current selected item
2. reload the table data
3. Handle a delegate method or notification that let me know when the reloading was done.
4. Re-select the proper item by finding it in the new list of items in the table.
Unfortunately I cannot find any way to determine when the table is done reloading. Is there a. any way to figure this out, or b. a more elegant solution to this problem?
thanks.
update: In case my problem was unclear, imagine you are in the mail app and you have some message selected. That summary cell is shown as selected on the left, and the details of the message are shown on the right. Suppose new mail comes in which appear as new cells at the top of the table. How is the message you are currently viewing preserved, and not de-selected?
reloadData is something of a sledgehammer. 10.7 offers a better solution.
Instead of using reloadData, when you have new rows to add, use insertRowsAtIndexes:withAnimation: . When you have rows to delete, use removeRowsAtIndexes:withAnimation: . And, of course, if an existing row has changed, there's reloadDataForRowIndexes:columnIndexes.
These should remember the selection for you (at least, the equivalents on iOS do).
If you can't target 10.7, some of the other suggestions will probably help out. noteNumberOfRowsChanged may also be helpful but I've not actually used it.
You can save selection on tableView(_:shouldSelectRow:) then select the row right after you create the cell in tableView(_:viewFor:row:) using selectRowIndexes(_:byExtendingSelection:).
It is pretty reliable no matter how / when / how many times you reload the table.

How to get drop-down menu in FLTK?

I am making a GUI with FLTK and I am wondering if there is a widget for something resembling a drop-down menu. I want one value to be shown, then have the user click the value (or something else associated with it), then a list of values be shown for the user to select one from, then the list collapse again. I have been unsuccessful finding documentation for a widget that can do this so I thought I would ask. Any help is appreciated.
I believe you are looking for FL_Choice.

Add a NEXT button to a Split View Controller

2 days of reading every posting i could get my hands on with no luck. Here is what I am trying to do:
I have a standard split view controller that loads a new view controller on the Right for each item you choose on the Left. Standard easy stuff. Now the "impossible part". I have added a big button in the middle of each detail view controller. I want to click the button and have it automatically advance to the next view (simulating someone actually clicking the next item in the root view in the left).
A bonus would be to actually have the left root view side also highlight the next row in the list when the button is hit.
I'd pay fifty bucks for working sample code "not much I know".
Thanks.
I think you should probably read the ViewController Programming tutorial...
http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/NavigationControllers/NavigationControllers.html%23//apple_ref/doc/uid/TP40007457-CH103-SW1

Resources