20030602 Monday June 02, 2003

Tabbed Menus - now with DHTML! I did some work this evening to adapt Adam Kalsey's Tabbed Menu demo to fit my own design. He simply changes the <body>'s class based on which tag the user has clicked on. While this seems reasonable, I'd rather do the menu-selection on the client-side. This allows a developer to integrate this menu into their app with no server-side coding needed. So here's a demo with a client-side (DHTML) method of selecting menus. Clicking on an item just sets a cookie and then reloads the page.

This client-side approach should make it much easier to integrate this menu into struts-menu. Posted in The Web at Jun 02 2003, 07:25:14 PM MDT 7 Comments

Comments:

When one uses the back button in Moz the selected tab doesn't change. The link in the address bar changes, but that's it.

Posted by Mark on June 02, 2003 at 06:51 PM MDT #

Good catch - don't know how I'll solve it though. It's pretty tough to trap the good ol' back button - but it's a legit concern as what if the user clicks on different link in the page (not on the menu), you still want to show the proper tab. Maybe I'll just match on URL and not use cookies. Any better ideas?

Posted by Matt Raible on June 02, 2003 at 07:31 PM MDT #

I would love to see more of this!!!

Posted by Vic on June 03, 2003 at 08:25 AM MDT #

There are many dhtml tab controls out there. The stuff at webfx.eae.net is very nice. http://webfx.eae.net/dhtml/tabpane/tabpane.html

Posted by Jason Horman on June 03, 2003 at 09:35 AM MDT #

Thanks for the link Jason - that's a nice implementation. However, for struts-menu, I'm trying to create a menu that operates over several pages - rather than one where all data is in a tabbed format on one single page.

Posted by Matt Raible on June 03, 2003 at 10:11 AM MDT #

I published a new version that does url-matching and uses cookies only when more than one url-match is found.

Posted by Matt Raible on June 03, 2003 at 02:16 PM MDT #

The day you make it into Struts Menu... I will put in basicPortal and baseBeans.com! preaty please. .V

Posted by Vic on June 03, 2003 at 02:49 PM MDT #

Post a Comment:
  • HTML Syntax: Allowed