Aensland
08-04-2008, 08:31 AM
1) Script Title: JsDOMenuBar
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/jsdomenubar/index.htm
3) Describe problem:
Summary: script works when I write a quick-n-dirty html file in notepad and doubleclick on it, but fails mysteriously when I point IE at my localhost webserver to it.
Detail: I'm using a Xampp install to write some webpages. After customising JsDOMenuBar to my liking, I rename the html file to php and put it in a folder where Apache can server it. Firefox displays the page just fine, but in IE the menu bar doesn't show. If I manually open explorer and doubleclick on the html file though, IE displays everything. This isn't useful, obviously, because I need it available via webserver.
If I tell IE to display script errors, I'll get an error message about an invalid character in line 1095 -- somewhere in the javascript include files no doubt, but there's certainly nothing wrong with them... because the damn thing works if I doubleclick on the html file. It just doesn't work when I want to serve it on my webserver.
IE seems to be choking on something, somewhere, but I don't know what. I've even thrown all the files into the same folder (localhost/web2.0/): includes, images and all, and it still doesn't work. Here it is, verbatim:
Contents of: index.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Test page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="outline.css" />
<link rel="stylesheet" type="text/css" href="office_xp.css" />
<script type="text/javascript" src="jsdomenu.js"></script>
<script type="text/javascript" src="jsdomenubar.js"></script>
<script type="text/javascript" src="webmain.inc.js"></script>
</head>
<body onload="initjsDOMenu()">
<p>
Menu bar should appear below:
</p>
<div id="staticMenuBar"></div>
<?
echo 'PHP output text.';
?>
</body>
</html>
Browser pointed at: http://localhost/web2.0/index.php. In FF, I get all the text and the menu bar in between -- in other words, this works. However, in IE, only the text appears (including the php echo text) but no menu bar, and if I have script error reporting turned on it'll complain about an invalid character in line 1095. I know this is false, however, because of the following:
If I rename the file to htm, and use windows explorer to doubleclick on it, IE displays the text (without the php bits) and also displays the menu bar. So the problem isn't just IE, but somewhere along the line where the page gets served.
I'm used to beating my head against errors but this one's too subtle for me. Anyone know what's going on?
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/jsdomenubar/index.htm
3) Describe problem:
Summary: script works when I write a quick-n-dirty html file in notepad and doubleclick on it, but fails mysteriously when I point IE at my localhost webserver to it.
Detail: I'm using a Xampp install to write some webpages. After customising JsDOMenuBar to my liking, I rename the html file to php and put it in a folder where Apache can server it. Firefox displays the page just fine, but in IE the menu bar doesn't show. If I manually open explorer and doubleclick on the html file though, IE displays everything. This isn't useful, obviously, because I need it available via webserver.
If I tell IE to display script errors, I'll get an error message about an invalid character in line 1095 -- somewhere in the javascript include files no doubt, but there's certainly nothing wrong with them... because the damn thing works if I doubleclick on the html file. It just doesn't work when I want to serve it on my webserver.
IE seems to be choking on something, somewhere, but I don't know what. I've even thrown all the files into the same folder (localhost/web2.0/): includes, images and all, and it still doesn't work. Here it is, verbatim:
Contents of: index.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Test page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="outline.css" />
<link rel="stylesheet" type="text/css" href="office_xp.css" />
<script type="text/javascript" src="jsdomenu.js"></script>
<script type="text/javascript" src="jsdomenubar.js"></script>
<script type="text/javascript" src="webmain.inc.js"></script>
</head>
<body onload="initjsDOMenu()">
<p>
Menu bar should appear below:
</p>
<div id="staticMenuBar"></div>
<?
echo 'PHP output text.';
?>
</body>
</html>
Browser pointed at: http://localhost/web2.0/index.php. In FF, I get all the text and the menu bar in between -- in other words, this works. However, in IE, only the text appears (including the php echo text) but no menu bar, and if I have script error reporting turned on it'll complain about an invalid character in line 1095. I know this is false, however, because of the following:
If I rename the file to htm, and use windows explorer to doubleclick on it, IE displays the text (without the php bits) and also displays the menu bar. So the problem isn't just IE, but somewhere along the line where the page gets served.
I'm used to beating my head against errors but this one's too subtle for me. Anyone know what's going on?