javascript error: Object expected

  • Thread starter Erik-Jan Bakker
  • Start date
E

Erik-Jan Bakker

Hello,

I am stuck with a weird javascript problem.... ;-(
Maybe it's somehting very simple, but I am really stuck in it, right
now.

What's the matter....
When place my website at a different hosting provider my webpage menu
generates the javascript error:

Line: 26
Char: 1
Error: Object expected
Code: 0

I still uses AllWebMenus for building the menu. But I can't find the
error metioned regarding
line 26.

I hope someone can get me on the right track again...

greets,
Erik-Jan Bakker

Here are some details

==========================
This is my source of the webpage:
==========================
<html>
<head>
<title>Menu</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<link rel="stylesheet" href="Groot.css" type="text/css">
</head>

<body bgcolor="#8fcfc2" text="#000000"
background="afbeeldingen/menupand.jpg" link="#000000" vlink="#000000"
alink="#000000">

<!-- ******** BEGIN ALLWEBMENUS CODE FOR grootmenu ******** -->
<img name='awmMenuPathImg-grootmenu' id='awmMenuPathImg-grootmenu'
src='./awmmenupath.gif' alt=''>
<script type='text/javascript'>var MenuLinkedBy='AllWebMenus [2]',
awmBN='500'; awmAltUrl='';</script>
<script src='grootmenu.js' language='JavaScript1.2'
type='text/javascript'></script>
<script type='text/javascript'>awmBuildMenu();</script>
<!-- ******** END ALLWEBMENUS CODE FOR grootmenu ******** -->
</body>
</html>

=========================
This is my source of grootmenu.js:
=========================
//----------DHTML Menu Created using AllWebMenus PRO ver
3.1-#500---------------
var awmMenuName='grootmenu';
var awmLibraryPath='/awmData-grootmenu';
var awmImagesPath='/awmData-grootmenu';
var awmSupported=(navigator.appName +
navigator.appVersion.substring(0,1)=="Netscape5" || document.all ||
document.layers || navigator.userAgent.indexOf('Opera')>-1)?1:0;
if (awmAltUrl!='' && !awmSupported)
window.location.replace(awmAltUrl);
if (awmSupported){
var awmMenuPath;
if (document.all) mpi=document.all['awmMenuPathImg-grootmenu'].src;
if (document.layers)
mpi=document.images['awmMenuPathImg-grootmenu'].src;
if (navigator.appName +
navigator.appVersion.substring(0,1)=="Netscape5" ||
navigator.userAgent.indexOf('Opera')>-1)
mpi=document.getElementById('awmMenuPathImg-grootmenu').src;
awmMenuPath=mpi.substring(0,mpi.length-16);
var nua=navigator.userAgent,scriptNo=(nua.indexOf('Gecko')>-1)?2:((document.layers)?3:((nua.indexOf('Opera')>-1)?4:((nua.indexOf('Mac')>-1)?5:1)));
document.write("<SCRIPT
SRC='"+awmMenuPath+awmLibraryPath+"/awmlib"+scriptNo+".js'><\/SCRIPT>");
var n=null;
awmzindex=1000;
}
var awmSubmenusFrame='mainframe';
var awmSubmenusFrameOffset;
var awmOptimize=0;
function awmBuildMenu(){
if (awmSupported){
awmImagesColl=['groot-sub.gif',10,10,'groot-sub2.gif',10,10];
awmCreateCSS(1,2,1,'#FFFFFF','#000000',n,'14px
Arial',n,'none',2,n,0,4)
awmCreateCSS(0,1,0,n,'#FFFFFF',n,n,n,'outset',2,'#C0C0C0',0,0)
awmCreateCSS(1,2,0,'#FFFFFF','#008E89',n,'bold 12px
Arial',n,'none',1,n,5,1)
awmCreateCSS(0,2,0,'#008E89',n,n,'bold 12px Arial',n,'none',1,n,5,1)
awmCreateCSS(1,2,0,'#FFFFFF','#008E89',n,'bold 12px
Arial',n,'none',1,n,5,0)
awmCreateCSS(0,2,0,'#008E89',n,n,'bold 12px Arial',n,'none',1,n,5,0)
var s0=awmCreateMenu(0,0,0,0,1,0,0,5,0,30,30,0,0,1,0,n,"",n,1,1,1,0,n,n);
it=s0.addItem(2,3,3,"De Letselschade
Site",n,n,"","",n,n,n,"letselschadesite.htm","mainframe");
it=s0.addItemWithImages(4,5,5,"Letselschade
algemeen",n,n,"",n,n,n,0,0,0,0,1,1,"",n,n,n,n,n);
it=s0.addItemWithImages(4,5,5,"Groot Expertisebureau
b.v.",n,n,"",n,n,n,0,0,0,0,1,1,"",n,n,n,n,n);
it=s0.addItemWithImages(4,5,5,"Nieuwsbrieven",n,n,"",n,n,n,0,0,0,0,1,1,"",n,n,n,n,n);
it=s0.addItem(2,3,3,"Kosten",n,n,"","",n,n,n,"kosten.htm","mainframe");
it=s0.addItemWithImages(4,5,5,"Overige
diensten",n,n,"",n,n,n,0,0,0,0,1,1,"",n,n,n,n,n);
it=s0.addItem(2,3,3,"Reaktie",n,n,"","",n,n,n,"reaktie.htm","mainframe");
s0.pm.buildMenu();
}}
 
E

Evertjan.

Erik-Jan Bakker wrote on 09 nov 2003 in comp.lang.javascript:
I still uses AllWebMenus for building the menu. But I can't find the
error metioned regarding
line 26.

I hope someone can get me on the right track again...

ErikJan,

als ik alle false line-returns uit de js file haal, blijft aleen over, dat
de functie awmCreateCSS() niet gedefinieerd is.
 
V

VK

Check all paths are correct after transferring to the new server.

1. <script src='grootmenu.js' language='JavaScript1.2'
type='text/javascript'></script>
2. var awmMenuName='grootmenu';
3. var awmLibraryPath='/awmData-grootmenu';
4. var awmImagesPath='/awmData-grootmenu';
 
E

Erik-Jan Bakker

VK said:
Check all paths are correct after transferring to the new server.

1. <script src='grootmenu.js' language='JavaScript1.2'
type='text/javascript'></script>
2. var awmMenuName='grootmenu';
3. var awmLibraryPath='/awmData-grootmenu';
4. var awmImagesPath='/awmData-grootmenu';

All these paths are correct.
I have checked them again.
 
L

Lisa Lasch

At vuurwerk.nl


Actually, I couldnt find an AllWebMenus menu in the link you supplied.
However, the error you mention has definitely to do with a missing
file /directory. Are you 100% sure you have uploaded the files in the
right locations? Have you checked the correct case for the file and
directory names? (check out the fact that the awmData-menuname
directory has a capital D which you will need to specify...).

If you still have any problems do not hesitate to contact us at
support @likno.com

Best regards

Lisa Lasch
Likno Development Team
 
E

Erik-Jan Bakker

Actually, I couldnt find an AllWebMenus menu in the link you supplied.
However, the error you mention has definitely to do with a missing
file /directory. Are you 100% sure you have uploaded the files in the
right locations? Have you checked the correct case for the file and
directory names? (check out the fact that the awmData-menuname
directory has a capital D which you will need to specify...).

If you still have any problems do not hesitate to contact us at
support @likno.com

Best regards

Lisa Lasch
Likno Development Team

Problem solved!

Instead of :
var awmLibraryPath='/awmData-grootmenu';
var awmImagesPath='/awmData-grootmenu';

I used:
var awmLibraryPath='';
var awmImagesPath='';

and placed all the necessary files in the root of the site.
Now it works fine.

I know this is a workaround, but it helps me out.
I checked serveral times de directory names and I am sure
it was alright (also with a capital "D"). Strange isn't it?
 

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

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top