Re[4]: Opera and the Back button
2005/05/26 04:16
Viewed 18791 times
Replies: 0/0

We have done a bit more testing here and have come up with a method to capture the error and fix the menu. It's a bit nasty but it seems to work however I don't have the knowledge of your code to fully implement a "correct" solution.

The basic premise is to add try.. catch blocks to the DynarchMenu.EventHandlers for each event and catch the exception that Opera generates. Then inside the exception handler we added a call to DynarchMenu.setup.

This had a few problems, those being that the original UL for the menu is deleted and that it created a second instance of the menu. We fixed these by removing the code that deletes the UL and by adding an ID to the created menu so that we could delete it in the setup function.

This seems to work fairly well for the instance where these is only a single menu but has a hard coded call to the DynarchMenu.setup inside the exception handler that includes the menu name and options so obviosuly this breaks when there is more than one menu (we have context menus on graphs and tables so this is a problem).

So, I guess my question comes down to this...
a) Is there a way we could store each of the created menus in the menu object and then be easily able to remove then recreate all the menus in the exception handler?
b) would you be willing to add this?

Regards,
Michael

Google