By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,695 Members | 1,597 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,695 IT Pros & Developers. It's quick & easy.

HELP - JSCookMenu problem

P: n/a

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>
Aug 8 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi Richard,
<SCRIPT LANGUAGE="text/javascript" SRC="JSCookMenu.js"></SCRIPT>


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">

Greetings,

Martin
Aug 8 '05 #2

P: n/a

"Martin Kurz" <in**@martinkurz.in-berlin.de> wrote in message
news:11*************@elch.in-berlin.de...
Hi Richard,
<SCRIPT LANGUAGE="text/javascript" SRC="JSCookMenu.js"></SCRIPT>


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.

Aug 8 '05 #3

P: n/a
Richard wrote:
"Martin Kurz" <in**@martinkurz.in-berlin.de> wrote in message
news:11*************@elch.in-berlin.de...
Hi Richard,

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


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.


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.

--
Rob
Aug 9 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.