Hi!

I am new to the hole website building stuff but i am trying. I've been having many problems, that I succesfully resolved. There is one exception. I cannot seem to make a menubar written in javascript to appear on the webpage. It's like the code has never been written. I searched simmilar situations on google, inserted different solutions but nothing worked.
I am using PHP editor 2010, BlueVoda and Notepad++, switching back and forth.

Could someone please help me?

The webpage i am now tormenting myself is http://journal.geopolitica.ro/archive.html
and the sourcecode is this one:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Geopolitica Journal</title>
<meta http-equiv="Page-Enter" content="blendTrans(Duration=3)">
<meta name="GENERATOR" content="Created by Ov">
<script type="text/javascript" src="./jscookmenu.js"></script>
<link rel="stylesheet" href="./ThemeIE/theme.css" type="text/css">
<script type="text/javascript" src="./ThemeIE/theme.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
function popupwnd(url, toolbar, menubar, locationbar, resize, scrollbars, statusbar, left, top, width, height)
{
   var popupwindow = this.open(url, '', 'toolbar=' + toolbar + ',menubar=' + menubar + ',location=' + locationbar + ',scrollbars=' + scrollbars + ',resizable=' + resize + ',status=' + statusbar + ',left=' + left + ',top=' + top + ',width=' + width + ',height=' + height);
}
//-->
</script>
<style type="text/css">
img { behavior: url("pngfix.htc"); }
</style>
</head>
<body bgcolor="#430303" text="#000000">
<div id="bv_Shape3" style="position:absolute;left:190px;top:31px;width:1023px;height:874px;z-index:0;" align="center">
<img src="images/bv01003.gif" id="Shape3" align="top" alt="" title="" border="0" width="1023" height="874" <img src="images/bv01003.gif" id="Shape3" align="center" alt="" title="" border="0" width="1023" height="874">
></div>
<div id="bv_Shape2" style="position:absolute;left:241px;top:44px;width:922px;height:81px;opacity:0.99;-moz-opacity:0.99;-khtml-opacity:0.99;filter:alpha(opacity=99);z-index:1;" align="center">
<img src="images/bv01002.png" id="Shape2" align="top" alt="" title="" border="0" width="922" height="81"></div>
<div id="bv_Text1" style="position:absolute;left:288px;top:56px;width:419px;height:51px;z-index:2;" align="left">
<font style="font-size:48px" color="#FFFFFF" face="Footlight MT Light"><b>Geopolitica&nbsp; Journal</b></font></div>
<hr noshade="noshade" size="1" width="550" color="#FF6820" id="Line1" style="margin:0;padding:0;position:absolute;left:291px;top:104px;width:550px;height:1px;z-index:3">
<div id="bv_Shape4" style="position:absolute;left:239px;top:499px;width:925px;height:363px;z-index:4;" align="center">
<img src="images/bv01004.gif" id="Shape4" align="top" alt="" title="" border="0" width="925" height="363"></div>
<div id="bv_Shape5" style="position:absolute;left:239px;top:532px;width:464px;height:38px;opacity:0.99;-moz-opacity:0.99;-khtml-opacity:0.99;filter:alpha(opacity=99);z-index:5;" align="center">
<img src="images/bv01005.png" id="Shape5" align="top" alt="" title="" border="0" width="464" height="38"></div>
<div id="bv_Shape1" style="position:absolute;left:240px;top:125px;width:923px;height:63px;z-index:6;" align="center">
<img src="images/bv01001.png" id="Shape1" align="top" alt="" title="" border="0" width="923" height="63"></div>
<div id="bv_Shape6" style="position:absolute;left:242px;top:125px;width:126px;height:62px;z-index:7;" align="center">
<a href="./index.html"><img src="images/bv01006.gif" id="Shape6" align="top" alt="" title="" border="0" width="126" height="62"></a></div>
<div id="bv_Shape7" style="position:absolute;left:364px;top:125px;width:134px;height:62px;z-index:8;" align="center">
<img src="images/bv01007.gif" id="Shape7" align="top" alt="" title="" border="0" width="134" height="62"></div>
<div id="bv_Shape8" style="position:absolute;left:498px;top:125px;width:138px;height:62px;z-index:9;" align="center">
<img src="images/bv01008.gif" id="Shape8" align="top" alt="" title="" border="0" width="138" height="62"></div>
<div id="bv_Shape9" style="position:absolute;left:634px;top:125px;width:134px;height:62px;z-index:10;" align="center">
<img src="images/bv01009.gif" id="Shape9" align="top" alt="" title="" border="0" width="134" height="62"></div>
<div id="bv_Image1" style="overflow:hidden;position:absolute;left:238px;top:189px;z-index:11" align="left">
<img src="images/Untitled.jpg" id="Image1" alt="" align="top" border="0" style="width:926px;height:310px;"></div>
<div id="bv_Shape10" style="position:absolute;left:768px;top:125px;width:132px;height:62px;z-index:12;" align="center">
<img src="images/bv01010.gif" id="Shape10" align="top" alt="" title="" border="0" width="132" height="62"></div>
<div id="bv_Shape11" style="position:absolute;left:900px;top:125px;width:130px;height:62px;z-index:13;" align="center">
<img src="images/bv01011.gif" id="Shape11" align="top" alt="" title="" border="0" width="130" height="62"></div>
<div id="bv_Shape12" style="position:absolute;left:1030px;top:125px;width:130px;height:62px;z-index:14;" align="center">
<a href="./contact.html"><img src="images/bv01012.gif" id="Shape12" align="top" alt="" title="" border="0" width="130" height="62"></a></div>
<div id="bv_Shape14" style="position:absolute;left:239px;top:872px;width:589px;height:23px;z-index:15;" align="center">
<img src="images/bv01014.gif" id="Shape14" align="top" alt="" title="" border="0" width="589" height="23"></div>
<input type="image" name="ImageButton1" id="ImageButton1" src="english-icon.gif" style="position:absolute;left:1133px;top:103px;width:29px;height:22px;z-index:16" title="English Language">
<input type="image" name="buton_ro" id="ImageButton2" src="Romania.gif" style="position:absolute;left:1094px;top:103px;width:31px;height:21px;z-index:17" title="Limba Română">
<div id="bv_Text2" style="position:absolute;left:280px;top:537px;width:150px;height:28px;z-index:18;" align="left">
<font style="font-size:24px" color="#E6E6FA" face="Perpetua Titling MT">A</font><font style="font-size:21px" color="#E6E6FA" face="Perpetua Titling MT">rchive</font></div>
<div id="bv_Shape13" style="position:absolute;left:713px;top:532px;width:2px;height:284px;z-index:19;" align="center">
<img src="images/bv01013.gif" id="Shape13" align="top" alt="" title="" border="0" width="2" height="284"></div>
<div id="bv_Flash1" style="position:absolute;left:753px;top:569px;width:372px;height:250px;z-index:20;" align="left">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="372" height="250" id="Flash1">
<param name="movie" value="My Flip Book.swf">
<param name="quality" value="High">
<param name="scale" value="ExactFit">
<param name="wmode" value="Transparent">
<param name="play" value="true">
<param name="loop" value="false">
<param name="menu" value="true">
<param name="allowfullscreen" value="true">
<param name="allowscriptaccess" value="sameDomain">
<param name="sAlign" value="L">
<embed src="My Flip Book.swf" width="372" height="250" quality="High" wmode="Transparent" loop="false" play="true" menu="true" allowfullscreen="true" allowscriptaccess="sameDomain" scale="ExactFit" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed>
</object>
</div>
<div id="bv_Text3" style="position:absolute;left:275px;top:615px;width:359px;height:22px;z-index:21;" align="left">
<font style="font-size:19px" color="#7F7F7F" face="Perpetua Titling MT">Please select the desired issue</font></div>
<div id="bv_Text5" style="position:absolute;left:747px;top:531px;width:380px;height:36px;z-index:22;" align="center">
<font style="font-size:16px" color="#7F7FA1" face="Perpetua Titling MT"> </font><font style="font-size:19px" color="#7F7FA1" face="Perpetua Titling MT">G</font><font style="font-size:16px" color="#7F7FA1" face="Perpetua Titling MT">eopolitica </font><font style="font-size:19px" color="#7F7FA1" face="Perpetua Titling MT">J</font><font style="font-size:16px" color="#7F7FA1" face="Perpetua Titling MT">ournal</font><font style="font-size:16px" color="#7F7FA1" face="Arial">. THE </font><font style="font-size:19px" color="#7F7FA1" face="Perpetua Titling MT">L</font><font style="font-size:16px" color="#7F7FA1" face="Perpetua Titling MT">atest </font><font style="font-size:19px" color="#7F7FA1" face="Perpetua Titling MT">I</font><font style="font-size:16px" color="#7F7FA1" face="Perpetua Titling MT">ssue </font><font style="font-size:16px" color="#7F7FA1" face="Perpetua Titling MT"><br>
</font><font style="font-size:11px" color="#7F7FA1" face="Arial">(watch it in fullscreen mode)</font></div>
<div id="bv_MenuBar1" style="position:absolute;left:278px;top:664px;width:252px;height:166px;z-index:2023;" align="left">
<script type="text/javascript">
<!--
var wbMenuMenuBar1 =
[
	[null, 'Year&nbsp;I.&nbsp;No.&nbsp;1(1)/2002', null, '_self', 'Year I. No. 1(1)/2002',
		[null, 'GEOPOLITICA&nbsp;SI&nbsp;RELIGIE.&nbsp;', null, '_self', 'GEOPOLITICA SI RELIGIE. ',
			[null, 'Badescu,&nbsp;Ilie.&nbsp;Insurectii&nbsp;religioase&nbsp;in&nbsp;secolul&nbsp;XX.&nbsp;Insurexia&nbsp;euxiniana', 'javascript:popupwnd(\'http://journalgeo@journal.geopolitica.ro/old_archive_pdf_flip/my_flip_book.swf\',\'yes\',\'yes\',\'yes\',\'yes\',\'yes\',\'yes\',\'\',\'\',\'\',\'\')', '_self', 'Badescu, Ilie. Insurectii religioase in secolul XX. Insurexia euxiniana']
		],
		[null, 'BALCANIA.&nbsp;', null, '_self', 'BALCANIA. ',
			[null, 'Cristea,&nbsp;Darie.&nbsp;Balcanii&nbsp;–&nbsp;Concept&nbsp;si&nbsp;imagine.&nbsp;O&nbsp;metafora&nbsp;substituita&nbsp;realitatii', null, '_self', 'Cristea, Darie. Balcanii – Concept si imagine. O metafora substituita realitatii'],
			[null, 'Dungaciu,&nbsp;Sandra.&nbsp;Avatarurile&nbsp;teoriei&nbsp;globalizarii&nbsp;in&nbsp;Balcani.&nbsp;Utilizari&nbsp;posibile&nbsp;si/sau&nbsp;eficiente&nbsp;ale&nbsp;instrumentelor&nbsp;de&nbsp;analiza', null, '_self', 'Dungaciu, Sandra. Avatarurile teoriei globalizarii in Balcani. Utilizari posibile si/sau eficiente ale instrumentelor de analiza']
		],
		[null, 'SECURITATE&nbsp;SI&nbsp;INTEGRARE.', null, '_self', 'SECURITATE SI INTEGRARE.',
			[null, 'Sava,&nbsp;Ionel&nbsp;Nicu.&nbsp;Geopolitics&nbsp;of&nbsp;Euro-Atlantic&nbsp;Integration.&nbsp;NATO’s&nbsp;Political&nbsp;Steps&nbsp;of&nbsp;Post-Cold&nbsp;War&nbsp;Transformation', null, '_self', 'Sava, Ionel Nicu. Geopolitics of Euro-Atlantic Integration. NATO’s Political Steps of Post-Cold War Transformation']
		],
		[null, 'SECURITATE&nbsp;SI&nbsp;APARARE.', null, '_self', 'SECURITATE SI APARARE.',
			[null, 'Dungaciu,&nbsp;Sandra.&nbsp;Social&nbsp;Sciences&nbsp;and&nbsp;the&nbsp;New&nbsp;Definition&nbsp;of&nbsp;Security.&nbsp;Suggestions&nbsp;for&nbsp;a&nbsp;new&nbsp;perspective&nbsp;on&nbsp;the&nbsp;world&nbsp;conflicts', null, '_self', 'Dungaciu, Sandra. Social Sciences and the New Definition of Security. Suggestions for a new perspective on the world conflicts']
		],
		[null, 'ETNOPOLITICA.', null, '_self', 'ETNOPOLITICA.',
			[null, 'Cotoi,&nbsp;Calin.&nbsp;Cenagaii.&nbsp;Inventarea&nbsp;esuată&nbsp;a&nbsp;unei&nbsp;minoritati&nbsp;nationale', null, '_self', 'Cotoi, Calin. Cenagaii. Inventarea esuată a unei minoritati nationale'],
			[null, 'Tircomnicu,&nbsp;Emil.&nbsp;Comunitatile&nbsp;romanesti&nbsp;din&nbsp;dreapta&nbsp;Dunarii', null, '_self', 'Tircomnicu, Emil. Comunitatile romanesti din dreapta Dunarii']
		],
		[null, 'GLOBALIZARE.', null, '_self', 'GLOBALIZARE.',
			[null, 'Kloos,&nbsp;Peter.&nbsp;The&nbsp;Many&nbsp;Faces&nbsp;of&nbsp;Globalization', null, '_self', 'Kloos, Peter. The Many Faces of Globalization'],
			[null, 'Cotoi,&nbsp;Calin.&nbsp;Etnicitate,&nbsp;Primordialism&nbsp;si&nbsp;Globalizare', null, '_self', 'Cotoi, Calin. Etnicitate, Primordialism si Globalizare']
		],
		[null, 'IDEEA&nbsp;EUROPEANA.', null, '_self', 'IDEEA EUROPEANA.',
			[null, 'Cristea,&nbsp;Darie.&nbsp;Europa&nbsp;lui&nbsp;Charlemagne&nbsp;sau&nbsp;Europa&nbsp;lui&nbsp;Prodi?', null, '_self', 'Cristea, Darie. Europa lui Charlemagne sau Europa lui Prodi?']
		],
		[null, 'ENCICLOPEDIA&nbsp;GEOPOLITICA.', null, '_self', 'ENCICLOPEDIA GEOPOLITICA.',
			[null, 'Badescu,&nbsp;Ilie.&nbsp;Alexander&nbsp;Dughin,&nbsp;geopolitica&nbsp;Rusiei&nbsp;si&nbsp;geopolitica&nbsp;ortodoxiei', null, '_self', 'Badescu, Ilie. Alexander Dughin, geopolitica Rusiei si geopolitica ortodoxiei']
		]
	],
	[null, 'Year&nbsp;II.&nbsp;No.&nbsp;1(2)/2003', null, '_self', 'Year II. No. 1(2)/2003'],
	[null, 'Year&nbsp;III.&nbsp;No.&nbsp;1(3)/2004', null, '_self', 'Year III. No. 1(3)/2004'],
	[null, 'Year&nbsp;IV.&nbsp;No.&nbsp;2(4)/2004', null, '_self', 'Year IV. No. 2(4)/2004'],
	[null, 'Year&nbsp;V.&nbsp;No.&nbsp;1(5)/2005', null, '_self', 'Year V. No. 1(5)/2005']
];
-->
</script>
<div id="MenuIDMenuBar1"></div>
<script type="text/javascript">
<!--
cmDraw('MenuIDMenuBar1', wbMenuMenuBar1, 'vbr', cmThemeIE, 'ThemeIE');
-->
</script>
</div>
</body>
</html>

Recommended Answers

All 7 Replies

Ovidette,

Look at your browser's javascript error messages/error console.

You will proably find an error occurs before the menu has rendered.

Airshow

Ovidette,

Look at your browser's javascript error messages/error console.

You will proably find an error occurs before the menu has rendered.

Airshow

Airshow,

I cannot find anything. This page (the menubar) doesnt work on Chrome, IE, Safari nor Mozilla. So, I figured, there must be something wrong with the code, right?

Yes, there is indeed something wrong with the code.

I tried IE and got Javascript errors. One moment, I'll try FF ......... same thing ...

Error 1:
Error: _cmNoClick is not defined
Source File: http://journal.geopolitica.ro/ThemeIE/theme.js
Line: 62

Error 2:
Error: cmDraw is not defined
Source File: http://journal.geopolitica.ro/archive.html
Line: 128

The second error will most probably not occur after the first has been fixed.

Airshow

Yes, there is indeed something wrong with the code.

I tried IE and got Javascript errors. One moment, I'll try FF ......... same thing ...

Error 1:
Error: _cmNoClick is not defined
Source File: http://journal.geopolitica.ro/ThemeIE/theme.js
Line: 62

Error 2:
Error: cmDraw is not defined
Source File: http://journal.geopolitica.ro/archive.html
Line: 128

The second error will most probably not occur after the first has been fixed.

Airshow

Thank you for your answear. Like I said, I am only a beginner in this type of activities :) but I think this is written in the theme.js where the code is this one:

var cmThemeFancyBase = '.';

try
{
	if (myThemeFancyBase)
	{
		cmThemeFancyBase = myThemeFancyBase;
	}
}
catch (e)
{
}

var cmThemeFancy =
{
  	    mainFolderLeft: '<div style="width: 14px; height: 28px" class="themeSpacerDiv" />',
        mainFolderRight: '<div style="width: 11px; height: 28px" class="themeSpacerDiv" />',
        mainItemLeft: '<div style="width: 14px; height: 28px" class="themeSpacerDiv" />',
        mainItemRight: '<div style="width: 11px; height: 28px" class="themeSpacerDiv" />',
        folderLeft: '<div style="width: 24px; height: 23px" class="themeSpacerDiv" />',
        folderRight: '<div style="width: 14px; height: 23px" class="themeSpacerDiv" />',
        itemLeft: '<div style="width: 24px; height: 23px" class="themeSpacerDiv" />',
        itemRight: '<div style="width: 14px; height: 23px" class="themeSpacerDiv" />',
        mainSpacing: 0,
        subSpacing: 0,
        delay: 100
};

var cmThemeFancyHSplit = [_cmNoClick, '<td  class="ThemeFancyMenuSplitLeft"><div></div></td>' +
					                          '<td  class="ThemeFancyMenuSplitText"><div></div></td>' +
					                          '<td  class="ThemeFancyMenuSplitRight"><div></div></td>'
		                         ];

var cmThemeFancyMainVSplit = [_cmNoClick, '<div>' +
                            '<table height="30" width="10" ' +
                            ' cellspacing="0"><tr><td class="ThemeFancyHorizontalSplit">' +
                           '|</td></tr></table></div>'];

var cmThemeFancyMainHSplit = [_cmNoClick, '<td  class="ThemeFancyMainSplitLeft"><div></div></td>' +
					                          '<td  class="ThemeFancyMainSplitText"><div></div></td>' +
					                          '<td  class="ThemeFancyMainSplitRight"><div></div></td>'
		                           ];

Is that ThemeIE/theme.js ?

The reason I ask is that I got an error at Line:62. The code above goes to only line 42.

Airshow

Is that ThemeIE/theme.js ?

The reason I ask is that I got an error at Line:62. The code above goes to only line 42.

Airshow

Sorry, my bad. That was the theme before. I thought initially that that file was wrong but the same thing happened (or didnt happen) with the IE theme. The code is below

var cmThemeIEBase = '/JSCookMenu/ThemeIE/';

// the follow block allows user to re-define theme base directory
// before it is loaded.
try
{
	if (myThemeIEBase)
	{
		cmThemeIEBase = myThemeIEBase;
	}
}
catch (e)
{
}

var cmThemeIE =
{
	prefix:	'ThemeIE',
  	// main menu display attributes
  	//
  	// Note.  When the menu bar is horizontal,
  	// mainFolderLeft and mainFolderRight are
  	// put in <span></span>.  When the menu
  	// bar is vertical, they would be put in
  	// a separate TD cell.

  	// HTML code to the left of the folder item
  	mainFolderLeft: '',
  	// HTML code to the right of the folder item
  	mainFolderRight: '',
	// HTML code to the left of the regular item
	mainItemLeft: '',
	// HTML code to the right of the regular item
	mainItemRight: '',

	// sub menu display attributes
	// HTML code to the left of the folder item
	folderLeft: '<img alt="" src="' + cmThemeIEBase + 'folder.gif">',
	// HTML code to the right of the folder item
	folderRight: '<img alt="" src="' + cmThemeIEBase + 'arrow.gif" align="top">&nbsp;',
	// HTML code to the left of the regular item
	itemLeft: '<img alt="" src="' + cmThemeIEBase + 'link.gif">',
	// HTML code to the right of the regular item
	itemRight: '',
	// cell spacing for main menu
	mainSpacing: 0,
	// cell spacing for sub menus
	subSpacing: 0,
	// auto dispear time for submenus in milli-seconds
	delay: 100,

	subMenuHeader: '<div class="ThemeIESubMenuShadow"></div><div class="ThemeIESubMenuBorder">',
	subMenuFooter: '</div>',

	// adjust sub menu positions
	offsetSubAdjust:	[-4, -3]
	// rest use default settins
};

// horizontal split, used only in sub menus
var cmThemeIEHSplit = [_cmNoClick, '<td colspan="3" class="ThemeIEMenuSplit"><div class="ThemeIEMenuSplit"></div></td>'];
// horizontal split, used only in main menu
var cmThemeIEMainHSplit = [_cmNoClick, '<td colspan="3" class="ThemeIEMenuSplit"><div class="ThemeIEMenuSplit"></div></td>'];
// vertical split, used only in main menu
var cmThemeIEMainVSplit = [_cmNoClick, '<div class="ThemeIEMenuVSplit">|</div>'];

/* IE can't do negative margin on tables */
/*@cc_on
	cmThemeIE.subMenuHeader = '<div class="ThemeIESubMenuShadow" style="background-color: #7f7f7f;filter: alpha(opacity=50);"></div><div class="ThemeIESubMenuBorder">';
@*/

Ovidette,

Javascript error 1 is generated by the line ...

var cmThemeIEHSplit = [_cmNoClick, '<td colspan="3" class="ThemeIEMenuSplit"><div class="ThemeIEMenuSplit"></div></td>'];

... because _cmNoClick is not defined.

Firebug tells me that the file ./jscookmenu.js doesn't exist or maybe it is just in a differnt directory path? See if you can track it down. It's likely that _cmNoClick is defined therein. If so, then fixing the path to _cmNoClick may well fix the problem.

Airshow

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.