Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE 5.0 Menu Issue---Experts Only! 2

Status
Not open for further replies.

fpwr

Programmer
Oct 21, 2003
95
US
We use a GREAT menu script from Brainjar.com that we've modified quite a bit to meet our needs for a dynamic menu based on login rights. One thing that we've noticed is that on boxes with IE 5.0 the menu gets "scrunched" up to the left and the cascade effect doesn't seem to work (even though it's supposed to be compatible and works great on IE 5.5 & 6.0). I can't figure out what the problem is.

Anyone that would like a challenge I've put together a self-contained "site" that will demonstrate the menu. You can download it (8KB) at:


ANY suggestions would be appreciated!

Paul.
 
The BrainJar menu script has an offset value for top and left. Also, it may be a good idea to follow the tutorial on how the menu works, which is on the site also.

Set the offsets accordingly until your menu is positioned appropriately.

I read that tutorial about a dozen times when I first began to learn Javascript, as it was a fantastic example. Now, that "expert" script which I once admired is nothing but routine coding.

Trust me, follow the tutorial - STEP BY STEP - you WILL not only get your menu where you want, but also will understand WHY.

--Trope
 
The problem isn't that the menu doesn't work (i.e. that the offset values are wrong).... As I stated in the original post it actually works great for us the way it is on IE 5.5 & 6.0. The problem is that there is something in the way IE 5.0 handles the script that is causing a problem. This is not addressed in the Brainjar tutorial that I can see (excellent as it is). Despite the earlier sarcastic comment (without any apparent insight) that is the reason for the "Experts Only" tag---this is probably more than a "routine coding" issue (like syntax) and needs someone with a deep understanding of browser compatibility and method support to take a look at.

Thanks for taking the time to reply though---it's appreciated!
 
I was watching javascript errors as I tried your demo code. But the menu effect was fine (as you say) in IE 6.

I don't want to sound nasty or anything, but have you attempted contacting the author (or brainjar themselves)? I mean... since they hold the copyright on this, they may be better placed to help you out.

I'll try from home this weekend and see if I can use an older browser to trigger the same problem.

Jeff
 
Heh...heh...yeah that was the first place I tried. His email address (from his site) came back undeliverable. :-( Thanks for any effort Jeff!
 
Please define expert.

----------
I'm willing to trade custom scripts for... [see profile]
 
Expert: The person who can solve the problem.
 
Define the problem then!

You want us to take a code and make it backwardly compatible, when you cant even tell us where the problem lies.

 
Menu works in IE 5.5 & 6 but not 5.0. Pretty clear in the first post & the thread.....
 
Fine - count me out then,

I try to help people who are trying to help themselves, not just pasting links and demanding answers!!!


Simon
 

I've had a quick look at it and I expect the "scrunching up" is a fault with the CSS (no time to hunt through to make sure).

And IIRC IE5 doesn't support push(), which is being used in the script, so that's one problem at least.

Don't have a copy of IE5 so there could well be other things wrong with it.

I think, given your tone, that's about as much time as I'm willing to give.
 

theboyhope - nice tip about IE5.0 notsupporting push, pop, or shift - I found this out the hard way last night, while researching a solution to another post ;o)

Now all I have to do is find out how to run IE5.0 while I have IE6 installed... Guessing virtual PC will come in handy ;o)

Will let you know if I find anything.

Dan
 

Here's the solution to the array problem and javascript errors. Put the following code at the top of Menu_Loader.js:

Code:
Array.prototype.push = ArrayPush;
function ArrayPush()
{
	this[this.length] = arguments[0];
	return(this.length);
}

This will create (or over-prototype) the array push function.

Still working on the CSS problem ;o)

Dan
 
Main CSS problem solved (the scrunching). Add the following into line 35 of your CSS:

Code:
height:0px;

Daft as it may appear, read this from MSDN:


"With earlier versions of Internet Explorer [earlier than 5.5], inline elements must have an absolute position or layout to use this property. Element layout is set by providing a value for the height property or the width property."

So we set the height to 0px, and we're set. Now onto the sub-menu arrow images ;o)

Dan
 
THANK YOU! Your tips have solved the problem. You qualify in my book as an "Expert"! [thumbsup2]

Paul.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top