Fine in Firefox but not showing in Explorer

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
christopherib
Beginner
Beginner
Posts: 3
Joined: Sat Jun 07, 2008 9:20 pm

Fine in Firefox but not showing in Explorer

Post by christopherib »

Hello,

I'm totally bamboozled.

http://www.nativeonline.co.uk/scavi/new ... igins.html

The menu works perfectly in Firefox (2.0) but when I open the page in Internet Explorer (7.0) the menu doesn't show and all HTML content called after the line that calls the JavaScript to build the menu is hidden. I've tried all sorts. The JavaScript is built dynamically at http://www.nativeonline.co.uk/scavi/new ... hp?lang=en

I've used an almost identical set-up on another site and it works fine.

Any help is appreciated.

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

Re: Fine in Firefox but not showing in Explorer

Post by Ruth »

Hi,

I will post to Milonic. I can't find the problem, but there is a major problem on the page since in IE I get nothing below the black line where the menu is suppossed to be. Just a greenish color, no text, no image, copyright stuff.

Ruth
christopherib
Beginner
Beginner
Posts: 3
Joined: Sat Jun 07, 2008 9:20 pm

Re: Fine in Firefox but not showing in Explorer

Post by christopherib »

Hello,

Well, I've got it working.

I changed:

<script type="text/javascript" src="menu.php?lang=en">

To:

<script type="text/javascript" src="menu.php?lang=en"></script>

That did the trick. I'm not sure why but I'm happy it's working now.

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

Re: Fine in Firefox but not showing in Explorer

Post by Ruth »

Hi,

You need both opening and closing tags for things. I can't believe I didn't notice that. I am glad you got it working. I remember the other one was working.

Ruth
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Re: Fine in Firefox but not showing in Explorer

Post by John »

Ruth wrote:You need both opening and closing tags for things.
Just to be picky, not for all things. It depends on the tag and the doctype; e.g., XHTML does require a closing tag for everything, regardless of whether or not HTML does. A simple example is <br>. OK in HTML, but not XHTML. There it needs to be <br /> (not </br>).

In this case, without the closing </script>, the browser took everything after the <script> to be part of the JS, and understandably got confused when it encountered code that wasn't JS.
John
peter@didm.co.uk
Beginner
Beginner
Posts: 5
Joined: Tue Dec 06, 2005 8:31 pm

Re: Fine in Firefox but not showing in Explorer

Post by peter@didm.co.uk »

John wrote: In this case, without the closing </script>, the browser took everything after the <script> to be part of the JS, and understandably got confused when it encountered code that wasn't JS.
With XHTML it should work with /> being used to close eg <script src="menu_data.js" type="text/javascript"/>

However, although this works with Firefox it does not work with IE6. I have done some testing and it appears to be an IE fault not Milonic's
Post Reply