Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Cascading Pulldown Menus

 
Sheriff
Posts: 440
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to create cascading pulldown menus for one of my browser applications. Basically it will look and feel like any other "windows" pull down menu with multiple choices below the main menu. For example, look at your browser menus, click File, under that is New, under that ... etc. Again it will be in the browser window that loads on the screen.
I am trying to find out what is best for this application, an applet, or JavaScript. Has anyone done this before? If so any dos and don'ts?
 
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're able to do Swing, I would use that. The SwingSet demo shows you a lot. JDK1.2 (Java 2) has Swing in it. JDK1.1 can do Swing if you download it seperate. (Not sure if the pluggin can have JDK1.1 and include Swing too. I saw Mac doing that.)
The closest thing to anything menu like using Javascript I found at http://www.htmlguru.com/
POP-Up Menu in a template is the thing to search for there. It doesn't look close to what you are looking for.
 
Matt Midcap
Sheriff
Posts: 440
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reference page!
I understand that Swing is super cool and can easily do what I need. I guess since this application is a web app, I've heard many horror stories about staying away from an applet. Reasons vary from browser differences to download time. Otherwise, if it were a "regular" application, I think Swing is the way to go hands down.
I've just found a site that may give me hope to do this in JavaScript:
http://developer.netscape.com/openstudio/tech/index_frame.html?cp=deo0
Definately worth checking out. The "display myMenu8" is what I've been looking for (minus the psyco colors). The only potential problem I see here is that "menu.js" that is used. It's loaded into the browser's cache (which is good). I may have a security issue here though as my users must first login. To do this I'm using the
<PRE>
META HTTP-EQUIV="pragma" content="no-cache"
META HTTP-EQUIV="expires" content="0"
</PRE>
tag to get rid of the password after login.
I need to do more research, if it wasn't for this stinking cold I would have know by now
Do you thing the META tag with "no-cache" is an issue after user login?
[This message has been edited by Matt Midcap (edited February 21, 1999).]
 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just be aware that this sample relies on DHTML which is only supported by version 4+ browsers. Another method may be to use GIF files (with imagemaps). Much like those changing buttons you see. Check out www.hp.com for an example of this. It is really simple to set up and will work with any browser. P.S that netscape javascript web site rocks.
[This message has been edited by Tim Uckun (edited February 22, 1999).]
 
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's weird. I just tried the helpful URL mentioned above ( http://developer.netscape.com/openstudio/tech/index_frame.html ) and got a message saying that I need to enable JavaScript in the browser. But it is enabled!
Do they really mean that whatever they are trying to do won't work on the corporate-standard Netscape 3.01 browser
that I'm using?
 
Tim Uckun
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That happened to me too once or twice then it started working OK. I might have just clicked through the error message and went about my business. It may be a bug. The rest of the website seems to work OK. I was using Netscape 4.06. I am sure a LOT of the scripting relies on Javascript 1.2 which I don't think 3.x browsers support.
 
Matt Midcap
Sheriff
Posts: 440
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I get the exact same message and I'm running Communicator 4.5 (one of the latest versions from Netscape) with JavaScript enabled. I think that as long as you can see the links below the message you can still get in - I can. I just ignored the message and went in. All of the JavaScript examples worked for me - therefor JavaScript was enabled on my machine. I think he is right it's a bug on their web site.
I also don't think any Netscape versions below 4.0 are JavaScript supported.
[This message has been edited by Matt Midcap (edited February 24, 1999).]
[This message has been edited by Matt Midcap (edited February 24, 1999).]
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you should visit the site www.lucent.com,they have neatly
implemented what you have mentioned.The effect can also be produced by tables by correctly positioning them and connecting there visibility to the mouse events.

 
Desperado
Posts: 3226
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Frank: I too got that message just now. How disappointing. The inventors of JavaScript can't even detect it in the latest (4.72) version of their own browser!!
BTW, I am glad to see this section moving... I would like to refresh my JavaScript...
 
reply
    Bookmark Topic Watch Topic
  • New Topic