• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

DHTML drop down menu - Cross Browser

 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am needing some cross browser code help. I am working on a DHTML drop down menu. You can view it at http://gregg.embeddedthought.com/gthought/index.php.
In IE it works great. In Mozilla, it doesn't work at all and I don't know what I am doing that is not Netscape/Mozilla compatible.
Here is some sample code, or you can just do View Source on the link above.

Thanks for any help.
[ September 11, 2003: Message edited by: Eric Pascarello ]
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have tried document.getElementById but either I am doing it wrong, or it is not working. It even throws an error in IE.
It says that the element I am getting is null or not an object.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
document.all is only ie
change document.all to document.getElementById
you might want to look at this script
http://www10.brinkster.com/a1ien51/JavaRanch/showhidetoggle.htm
or this one
http://www10.brinkster.com/a1ien51/JavaRanch/innerhtmltext.htm
or this one
http://www10.brinkster.com/A1ien51/basics/innerhtmlcompat.htm
Eric
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Between my last post and your post, I figured it out. I had to use () and put the element id in ' '.
Thanks Eric.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
BTW - how do those menus look? Lame or alright?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, more problems. But these are appearntly css problems. The background image is not showing up on the Menu. And the Borders around the Menu items are not showing up. If you look at the difference between the IE version and the Mozilla version, you will see what I mean. Here is my CSS and what not.

I am going to guess that it might be with the url(...) part, but I don't know what else to use there.

Not sure why that isn't working.
Thanks.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It does not look bad, but the one thing that people might find a pain is when they move off of it, it closes right away. I have a made a menu in the past. I forgot about it until I was looking through my site for a file tonight.
http://www10.brinkster.com/a1ien51/Menus/A1ien51MenuV1.htm
I have no idea how it was coded, since I do not remember doing it, or what browsers it works in.
Eric
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not 100% positive but is it the .png file? Try to use a bmp just for a quick test....I just have a weird feeling,,,or it might be my bed calling!
Eric
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Still a no go. I will worry about it tomorrow. The bed IS calling me. Thanks for the help.
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In case you're interested, below is a link to a DHTML menu that works great on any platform. I've used it on the site I run for my school and it works great. You might want to check it out.
http://www.dynamicdrive.com/dynamicindex1/hvmenu/index.htm
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Scott Christy:
In case you're interested, below is a link to a DHTML menu that works great on any platform. I've used it on the site I run for my school and it works great. You might want to check it out.
http://www.dynamicdrive.com/dynamicindex1/hvmenu/index.htm


Thanks for the link. Yeah, it's nice, but it's nothing exciting and it is really plain and dull (no offense intended).
That is why I am using images and CSS, to make mine a bit more pleasant to the eyes.
 
reply
    Bookmark Topic Watch Topic
  • New Topic