469,348 Members | 1,454 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,348 developers. It's quick & easy.

Help with Expanding Menu items disappearing

I wonder if someone would help me and take a look at a strange problem
I'm facing with a webpage I'm building. The page is at
http://author.www.purdue.edu/swo/test.html.

By using Internet Explorer v6, you will see the problem I'm having (so
far I've tested this page only in IEv6, FF2 and IE7). If you click on
the navigation menu on the left side (Alcohol, Tobacco & Other Drugs,
General Wellness, Nutrition, etc.), the menus expand. Click on the
item in the menu again and the expanded menu collapses. For some
reason in IEv6, some of the menu items (usually the lower ones)
disappear. I can't figure out why.

I'd very much appreciate anyone who takes the time to look at the
source on the page and hopefully give me an idea of why this is
happening. Also, any comments about the page would be appreciated
(suggestions, comments, things to remove or stay away from, criticism,
etc.)

By the way, what are some great browser checking sites out there. I
did some searches, but I don't really know what they are called, so I'm
not finding too much.

Thanks so much!
Greg

Nov 14 '06 #1
2 1627
Please help me with this. I'm assuming it's javascript, but maybe it's
the css?

Thanks!
Greg

Greg wrote:
I wonder if someone would help me and take a look at a strange problem
I'm facing with a webpage I'm building. The page is at
http://author.www.purdue.edu/swo/test.html.

By using Internet Explorer v6, you will see the problem I'm having (so
far I've tested this page only in IEv6, FF2 and IE7). If you click on
the navigation menu on the left side (Alcohol, Tobacco & Other Drugs,
General Wellness, Nutrition, etc.), the menus expand. Click on the
item in the menu again and the expanded menu collapses. For some
reason in IEv6, some of the menu items (usually the lower ones)
disappear. I can't figure out why.

I'd very much appreciate anyone who takes the time to look at the
source on the page and hopefully give me an idea of why this is
happening. Also, any comments about the page would be appreciated
(suggestions, comments, things to remove or stay away from, criticism,
etc.)

By the way, what are some great browser checking sites out there. I
did some searches, but I don't really know what they are called, so I'm
not finding too much.

Thanks so much!
Greg
Nov 15 '06 #2

Greg wrote:
I wonder if someone would help me and take a look at a strange problem
I'm facing with a webpage I'm building. The page is at
http://author.www.purdue.edu/swo/test.html.
You will likely get better help from a CSS group, though there is a bug
with your script when clicking on the last menu item (use Firefox to
see the issue)[1].

Try:

news:comp.infosystems.www.authoring.stylesheets
<URL:
http://groups.google.com.au/group/co...g.stylesheets/
>


1. The issue is with the following:

var last_obj = document.getElementById(last_expanded);
last_obj.className = "hide";

You need to check that getElementById returned a DOM object first
before trying to set a property, e.g. the following. The simple test
should be sufficient, the more rigorous approach using typeof should
not be required since getElementById should return an object or
undefined:

var last_obj = document.getElementById(last_expanded);

// Simple:
if (last_obj) last_obj.className = "hide";

// Rigorous:
if (typeof last_obj == 'object') last_obj.className = "hide";
--
Rob

Nov 16 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by Kyle James Matthews | last post: by
2 posts views Thread by Jackson Yap | last post: by
1 post views Thread by Bhiksha Raj | last post: by
1 post views Thread by Peter Morris [Droopy eyes software] | last post: by
24 posts views Thread by Rhino | last post: by
4 posts views Thread by Rabel | last post: by
reply views Thread by andy | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.