The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Navigation Menu
Mandy
post Sep 6 2007, 06:46 AM
Post #1





Group: Members
Posts: 6
Joined: 28-April 07
Member No.: 2,650



Good morning! I am trying to set up a menu for the site I am working on for our local fire department. I got the code below to use to develop my menu, but it won't work when I upload the page with it on there...nothing shows. Can someone help me find the error and fix it, please???

Thanks so much!

--Mandy



<html>
<head>
<title>Mapleton Fire Department - Mapleton, Maine</title>
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Original: Younes Bouab (bouaby@hotmail.com ) -->
<!-- Web Site: http://www.SUPEReDITION.com -->
<script language="javascript" src="Config.js"></script>
<script language="javascript" src="Menu.js"></script>

</HEAD>


<BODY>

<script LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
<!--
AddMenu("1" , "1" , "About MFD" , "" , "" , "");
AddMenu("2" , "1" , "Location" , "" , "" , "http://www.geocities.com/frozennorthweb/MapletonFD/location.html");
AddMenu("3" , "1" , "History" , "" , "" , "http://www.geocities.com/frozennorthweb/MapletonFD/history.html");
AddMenu("4" , "1" , "The Crew" , "" , "" , "http://www.geocities.com/frozennorthweb/MapletonFD/crew.html");
AddMenu("6" , "6" , "Services" , "" , "" , "");
AddMenu("7" , "6" , "Fire & Rescue" , "" , "" , "http://www.geocities.com/frozennorthweb/MapletonFD/firerescue.html");
AddMenu("8" , "6" , "Fire Prevention" , "" , "" , "http://www.geocities.com/frozennorthweb/MapletonFD/prevention.html");
AddMenu("9" , "6" , "Fire Safety Education" , "" , "" , "http://www.geocities.com/frozennorthweb/MapletonFD/education.html");
AddMenu("10" , "10" , "News & Events" , "" , "" , "");
AddMenu("11" , "10" , "Headlines" , "" , "" , "http://www.geocities.com/frozennorthweb/MapletonFD/headlines.html");
AddMenu("12" , "10" , "Call Log" , "" , "" , "http://www.geocities.com/frozennorthweb/MapletonFD/calllog.html");
AddMenu("13" , "10" , "Upcoming Events" , "" , "" , "http://www.geocities.com/frozennorthweb/MapletonFD/events.html");
AddMenu("14" , "14" , "Forms" , "" , "" , "");
AddMenu("15" , "14" , "Burn Permit Application" , "" , "" , "http://www.geocities.com/frozennorthweb/MapletonFD/permit.doc");
AddMenu("16" , "16" , "Contact" , "" , "" , "");
AddMenu("17" , "16" , "E-Mail" , "" , "" , "mailto:madeinmaine79@aol.com");
AddMenu("18" , "16" , "Message Board" , "" , "" , "http://www.javascriptsource.com");
AddMenu("19" , "16" , "Guestbook" , "" , "" , "http://www.javascriptsource.com");

Build();
-->
// End -->
</script>
<font face="arial, helvetica" size="size"> </font>
<p> 
<p>

</body>
</html>



Here is the link to where I got it: http://javascript.internet.com/navigation/...ition-menu.html
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Sep 6 2007, 11:12 AM
Post #2


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



CODE
<script language="javascript" src="Config.js"></script>
<script language="javascript" src="Menu.js"></script>

It appears the two files Config.js and Menu.js mentioned above are not provided on http://javascript.internet.com/navigation/...ition-menu.html

I recommend you use a better menu, such as http://www.htmldog.com/articles/suckerfish/dropdowns/

CODE
<!-- Begin
    <!--
    ....
    -->
//  End -->

As a side-note: the above is a nested HTML comment, is that valid HTML/SGML? The validator didn't complain.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Sep 6 2007, 11:37 AM
Post #3


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



Didn't complain? I get
QUOTE
Error: invalid comment declaration; check your comment syntax
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Sep 6 2007, 02:03 PM
Post #4


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



QUOTE(Darin McGrew @ Sep 6 2007, 06:37 PM) *

Didn't complain? I get
QUOTE
Error: invalid comment declaration; check your comment syntax


Testing again, this causes no error:

CODE
<!-- Begin
    <!--
    -->
//  End -->

but this does:

CODE
<!-- Begin
    <!--
    foo
    -->
//  End -->

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Sep 6 2007, 02:42 PM
Post #5


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



QUOTE(Christian J @ Sep 6 2007, 12:03 PM) *
Testing again, this causes no error:

CODE
<!-- Begin
    <!--
    -->
//  End -->

but this does:

CODE
<!-- Begin
    <!--
    foo
    -->
//  End -->

Yep. That's because the formal syntax allows multiple comments within a single comment declaration. (I think I have that terminology correct.) Basically,
CODE
<!-- This is a comment <!--
--> and this is another comment -->
Note that comments start and end with "--" so you need an even number of "--" tokens. And
CODE
<!-- This is a comment <!--
this is invalid because it is non-whitespace between two comments
--> and this is another comment -->


Of course, what browsers do and what the spec says are likely to be different, especially with comment syntax. There's too much crap markup out there for browsers to enforce SGML-style comments strictly.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Mandy
post Sep 6 2007, 03:03 PM
Post #6





Group: Members
Posts: 6
Joined: 28-April 07
Member No.: 2,650



ohmy.gif LOL I don't know what any of that stuff means.

I am pretty good with HTML, and just starting to get into some more difficult stuff, does anyone know of a site where I could get the codes for something like that, that I just edit to suit my situation? I tried the link above, but I don't really understand how it all goes together.

Please help, LOL


Thanks in advance

Mandy
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Sep 6 2007, 03:30 PM
Post #7


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



Don't worry too much about the discussion about comment syntax, except that you can't next HTML comments inside other HTML comments. There's a good practical discussion in the FAQ entry How can I include comments in HTML?

Can you post the URL (address) of a document that demonstrates the problem? It sounds like Christian J's suggestion (Config.js and Menu.js may be missing) is accurate, but it's hard to say without seeing what you've tried.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Mandy
post Sep 6 2007, 07:04 PM
Post #8





Group: Members
Posts: 6
Joined: 28-April 07
Member No.: 2,650



Hey Darin,

Thanks for your help. The link to the page is here, http://www.geocities.com/frozennorthweb/Ma...onFD/index.html

I usually design the first page, have it approved, and then move it to a paid service after I get the go-ahead on it. Basically, I've set up the code as I was instructed, edited it to include the links I wanted and then uploaded the page, and it just comes up as a blank white page with a java error box that pops up and asks to debug.

I really want the nav bar to have this drop down feature, so if you could point me in the right direction, I would really appreciate it.

Thanks so much,

Mandy
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Sep 6 2007, 08:20 PM
Post #9


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



http://www.geocities.com/frozennorthweb/MapletonFD/Config.js
404 Not Found

http://www.geocities.com/frozennorthweb/MapletonFD/Menu.js
404 Not Found

Where is AddMenu() defined?

While you're at it, there really isn't any need to use <!-- HTML comments --> inside SCRIPT elements any longer. Even browsers that don't support JavaScript know to ignore SCRIPT elements.

And your page has no non-JavaScript content.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Mandy
post Sep 7 2007, 05:31 AM
Post #10





Group: Members
Posts: 6
Joined: 28-April 07
Member No.: 2,650



Here is the link to where I got it: http://javascript.internet.com/navigation/...ition-menu.html

I just copied the section it says to put in the head of the document and the same for the part it says to put in the body of the document.... :-/

I wanted to get that done first, which is why there is no other html on the page yet. :-)



This is more of a project than I thought it would be, lol!!!

Mandy
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Sep 7 2007, 07:49 AM
Post #11


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



QUOTE(Mandy @ Sep 7 2007, 12:31 PM) *

Here is the link to where I got it: http://javascript.internet.com/navigation/...ition-menu.html

I just copied the section it says to put in the head of the document and the same for the part it says to put in the body of the document.... :-/

The instructions are apparently wrong. However you can get the missing files anyway, since there's a demo menu at the top (just below the ordinary internet.com menu, which is also a dropdown menu) But since the demo menu doesn't even appear in Opera I suggest you don't use it.

If you think the "suckerfish" menu instructions are complicated there are links to simple demo pages at the bottom of the page.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Mandy
post Sep 7 2007, 11:40 AM
Post #12





Group: Members
Posts: 6
Joined: 28-April 07
Member No.: 2,650



OK, I found a dhtml editor that helped me get something on the page at least...now though, I keep getting the message telling me there is an error, and do I want to debug.

Can someone help?? Here is the link: http://www.geocities.com/frozennorthweb/Ma...onFD/index.html

and below is the code I've copied and pasted:



<script language="JavaScript1.2" src="MENU.js"></script>
<script language="JavaScript1.2" src="cdm_all.js"></script>

<div align="center">
<TABLE BORDER="0" WIDTH="944">
<TR>
<TD ALIGN="CENTER"> <a href="http://www.geocities.com/frozennorthweb/MapletonFD/index.html" target="_self"><img
name="CDM_image1" onmouseover="activate(1);" onmouseout="deactivate(1)" src="http://www.geocities.com/frozennorthweb/MapletonFD/graphics/cdm_1_menu.png" width="157" height="15" border="0"></a><img
name="CDM_image2" onmouseover="activate(2);" onmouseout="deactivate(2)" src="http://www.geocities.com/frozennorthweb/MapletonFD/graphics/cdm_2_menu.png" width="157" height="15" border="0"><img
name="CDM_image3" onmouseover="activate(3);" onmouseout="deactivate(3)" src="http://www.geocities.com/frozennorthweb/MapletonFD/graphics/cdm_3_menu.png" width="157" height="15" border="0"><img
name="CDM_image4" onmouseover="activate(4);" onmouseout="deactivate(4)" src="http://www.geocities.com/frozennorthweb/MapletonFD/graphics/cdm_4_menu.png" width="157" height="15" border="0"><img
name="CDM_image5" onmouseover="activate(5);" onmouseout="deactivate(5)" src="http://www.geocities.com/frozennorthweb/MapletonFD/graphics/cdm_5_menu.png" width="157" height="15" border="0"><img
name="CDM_image6" onmouseover="activate(6);" onmouseout="deactivate(6)" src="http://www.geocities.com/frozennorthweb/MapletonFD/graphics/cdm_6_menu.png" width="157" height="15" border="0"></TD></tr></table>






Thanks so much in advance!

Mandy
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Sep 7 2007, 01:11 PM
Post #13


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



QUOTE(Mandy @ Sep 7 2007, 09:40 AM) *
<script language="JavaScript1.2" src="MENU.js"></script>
<script language="JavaScript1.2" src="cdm_all.js"></script>
http://www.geocities.com/frozennorthweb/MapletonFD/MENU.js
"Sorry, the page you requested was not found."

http://www.geocities.com/frozennorthweb/Ma...onFD/cdm_all.js
"Sorry, the page you requested was not found."

One of these missing files is probably supposed to define activate() and deactivate().

IMHO, your approaches have been going down the wrong path. Start with working navigation links that don't require JavaScript. Then use JavaScript/CSS to dress them up. A missing JavaScript file shouldn't prevent your navigation from working.

There's a nice CSS-based example at Eric Meyer's css/edge site. It works fine in modern browsers, but not in MSIE. However, there are JavaScript techniques to do something similar that works with MSIE.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Frederiek
post Sep 8 2007, 03:13 AM
Post #14


Programming Fanatic
********

Group: Members
Posts: 5,146
Joined: 23-August 06
From: Europe
Member No.: 9



Or go see at http://www.cssplay.co.uk/menus/.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 27th April 2024 - 11:40 PM