Intermittent menu problems on IE

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
indod
Beginner
Beginner
Posts: 7
Joined: Thu Feb 09, 2006 8:59 am

Intermittent menu problems on IE

Post by indod »

Hi there,

First time posting, just want to say excellent product, I'll be using it (and paying you!) in all my future web dev projects.

Just one issue, very weird, but first some background....

Menu data is generated (maybe not efficiently) from a mysql server using a php script. This menu data works fine on the following scenarios;
-> Using Firefox in both a development (localhost) and live environment
-> Using IE in a development environment.

However using IE in the live environment, intermittently, the menu is not displayed, similar to if there was an error in the menu data file, but I set up a debug of sorts, that writes the menu data file contents to a text file. On using this static text file as my menu data source the menu work well.

So this indicates that its not the contents of the menu data file. I wonder if any latency in drawing the data from the db, could be causing the problem?

I know the next step is to ask me to post the URL, but before I do that, has anybody had similar experience or could possibility provide some insight to where I may be going wrong....

Thanks a ton.

Indod
Migru
Milonic Guru
Milonic Guru
Posts: 669
Joined: Tue Nov 01, 2005 8:22 pm
Location: Hamburg - Germany
Contact:

Post by Migru »

Hi

2 questions: Did you follow those suggestions? Please have a closeer look:

a)
PAGE INTEGRATION
http://milonic.com/integration.php

b) if the menu is in a <td>

MENU IN A TABLE
http://milonic.com/tablemenu.php


Michael
indod
Beginner
Beginner
Posts: 7
Joined: Thu Feb 09, 2006 8:59 am

Post by indod »

Hey Michael,

Thanks for the speedy reply and the suggestions. I reviewed both links and am pretty confident I have covered all my bases in terms of integration, and the menu is not sitting in a table (I had a fight with that problem earlier on in development!)

This is also very unusual.....

When viewing the site (with the menu) in IE, I cannot access the view source functionality "View" > "Source". When viewing any other site (incl milonic.com) it works fine.....

I'm going to try streamline the access time on the menu data page and see if this helps, but any feedback will be greatly appreciated.

Thanks
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

We are really going to need a url for this case. We have to be at the site where it's happening to figure out what's going on. Without that, we can keep giving you suggestions but they may not be applicable to fixing the problem.

Ruth
indod
Beginner
Beginner
Posts: 7
Joined: Thu Feb 09, 2006 8:59 am

Post by indod »

Hi,

i understand, the URL is

http://www.orms.co.za/newsite/

Using the menu, browse to the following menu item

"Products" > "Cameras" > "Digital Compact" > "Canon"

A list of cameras will be loaded up, now on the breadcrumb navigation just below the menu, click on the home link "WELCOME TO ORMS PHOTOGRAPHIC WAREHOUSE". 99% of the time, the menu bar will not display only the grey gradient background image.

As in my original post, this only happens on IE in the live environment.

I tried cutting down the amount of records that is pulled from the database, but this had no affect.

Thanks.
Migru
Milonic Guru
Milonic Guru
Posts: 669
Joined: Tue Nov 01, 2005 8:22 pm
Location: Hamburg - Germany
Contact:

Post by Migru »

Hi

is it correct to reference a js file using php suffix ?

<SCRIPT language=JavaScript src="menu_data.php"


Michael
indod
Beginner
Beginner
Posts: 7
Joined: Thu Feb 09, 2006 8:59 am

Post by indod »

Hi Michael,

This should be fine, as long as the output is correct javascript syntax, also I am adding the correct mime type header before outputing the display.

Indod
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Yes, you can use that ending. Milonic uses it. Actually you can use php, cfm, and a bunch of them. :lol: Aren't my technical terms just terrific!

Ruth
indod
Beginner
Beginner
Posts: 7
Joined: Thu Feb 09, 2006 8:59 am

Post by indod »

Hi,

Some potential new developments....

I did say the menu was working correctly all the time in Firefox....however, some times the Firefox JavaScript Debug tool indicates an error, the error is;
Error: h$ is not defined
Source File: http://www.orms.co.za/newsite/index.php
Line: 1
Now this only happens intermittently, what may be happening is that when this error occurs in IE its just doesn't display the menu, but when it happens in Firefox its able overcome the error and still display the menu (gotta love a compliant browser!).

Any thought to this $h error?

Indod
indod
Beginner
Beginner
Posts: 7
Joined: Thu Feb 09, 2006 8:59 am

Post by indod »

Problem Solved - I think.

Michael, you were on the right track, and I was being an idiot :oops:

Basically, the menu data was being served as JavaScript through a PHP script (to grab data from the db), this isn't a problem, as long as the correct content type (in this case text/javascript) is provided before outputting the data. However the extension does not have to be js, it can be xyz as long as the correct content header is supplied

I was using the incorrect content type which was causing the "h$ not defined " error message.

Also, the reason why it was working on the dev server and not the live server, was that the live server was correctly configured to server PHP files as html not as JavaScript content type.

So, anyway, after adding the following correct PHP code;

Code: Select all

header("Content-type: text/javascript");
All seems to be working well

Thanks to Michael and Ruth for your input.

Indod
Migru
Milonic Guru
Milonic Guru
Posts: 669
Joined: Tue Nov 01, 2005 8:22 pm
Location: Hamburg - Germany
Contact:

Post by Migru »

Hi

you´re welcome.

Michael
User avatar
liquidrain3
Beginner
Beginner
Posts: 3
Joined: Fri Mar 24, 2006 1:26 am

Post by liquidrain3 »

I really like the site...It looks fan-freaking-tastic. Web design is definitely for you! The only thing that bothered me were the redundancies in the menu. I know you wrote a script that automatically produces menu content, so maybe it's not possible to do what I'm suggesting...But I think that if you lessen the frequency of redundancies on the menu, the site would be greatly enhanced. Good luck!
indod
Beginner
Beginner
Posts: 7
Joined: Thu Feb 09, 2006 8:59 am

Post by indod »

hi,

thanks for the feedback, really appreciated.

when you refer to the redundancies.......do you mean duplicate info on the menu items?

Indod
Post Reply