HELP - JSCookMenu problem

R

Richard

I am trying (for first time) to get Yuan Heng's JSCookMenu to work.

I have placed "JSCookMenu.js" in the main web directory (ie. in
http://xyz.com/) , and created a folder called ThemeIE (ie.
http://xyz.com/ThemeIE/) to hold the image files, and the "theme.css" and
"theme.js" files.

I have edited "theme.js" script, and changed the first line to:-
var cmThemeIEBase = 'ThemeIE/';
(previously it referred to '/~heng/JSCookMenu/ThemeIE/')

(I've also tried the script with '/ThemeIE/' instead of 'ThemeIE/' - no
difference!)

Lastly I've created the following test.htm to check if it works - but I
ALWAYS get script error that "myMenu" is undefined.

Can anyone tell me what's wrong please? Better still, what I need to do to
code this correctly?

Thanks
-------------------

<html>
<head>


</head>

<body link="#000080" vlink="#800080" text="#FFFF00" bgcolor="#0000FF"
alink="#FF0000">


<DIV ID="MenuDefinition">
<SCRIPT LANGUAGE="text/javascript" SRC="JSCookMenu.js"></SCRIPT>

<LINK REL="stylesheet" HREF="ThemeIE/theme.css" TYPE="text/css">
<SCRIPT LANGUAGE="text/javascript" SRC="ThemeIE/theme.js"></SCRIPT>

<SCRIPT LANGUAGE="text/javascript">
<!-- var myMenu =
[
[null,'Home','www.yahoo.com','_top','Return to Home page',
[null,'Welcome','www.yahoo.com','_top','Return to Home page'],
[null,'Contact Us','home_contact.htm','_top','Contact information']
],
[null,'News','news_index.htm','detail','News pages',
[null,'News Index','news_index.htm','_top','Main news index'],
]
];
-->
</SCRIPT>

<DIV ID='myMenuID'></DIV>

<SCRIPT LANGUAGE="JavaScript"><!--
cmDraw ('myMenuID', myMenu, 'hbr', cmThemeIE, 'ThemeIE');
--></SCRIPT>

</DIV>

</body>

</html>
 
R

Richard

Martin Kurz said:
Hi Richard,


Don't know if it changes anything, but the value for the
langauge-attribute in a
script-Tag is "JavaScript" not "text/javascript" - that's the
type-Attribute:

<script language="JavaScript" type="text/javascript" src="JSCookMenu.js">

Hi

Changed that - no difference :-( ... exact same error.
 
R

RobG

Richard said:
Hi

Changed that - no difference :-( ... exact same error.

Language is depreciated, type is required. It rarely makes any
difference but can cause very difficult to find problems in particular
circumstances - and it will make a validator squawk.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,262
Messages
2,571,056
Members
48,769
Latest member
Clifft

Latest Threads

Top