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

javascript error: Object expected

P: n/a
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('Gec ko')>-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","main frame");
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,"kost en.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,"rea ktie.htm","mainframe");
s0.pm.buildMenu();
}}
Jul 20 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
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.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #2

P: n/a
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';
Jul 20 '05 #3

P: n/a
"VK" <sc**********@yahoo.com> wrote in message news:<3f***********************@news.freenet.de>.. .
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.
Jul 20 '05 #4

P: n/a
Erik-Jan Bakker hu kiteb:
"VK" <sc**********@yahoo.com> wrote in message
news:<3f***********************@news.freenet.de>.. .
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.


Where do you have it online?
--
--
Fabian
Visit my website often and for long periods!
http://www.lajzar.co.uk

Jul 20 '05 #5

P: n/a
"Fabian" <la****@hotmail.com> wrote in message news:<bo*************@ID-174912.news.uni-berlin.de>...
Erik-Jan Bakker hu kiteb:
"VK" <sc**********@yahoo.com> wrote in message
news:<3f***********************@news.freenet.de>.. .
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.


Where do you have it online?
--

At vuurwerk.nl
Jul 20 '05 #6

P: n/a
>

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
Jul 20 '05 #7

P: n/a
li**@likno.com (Lisa Lasch) wrote in message news:<15**************************@posting.google. com>...


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


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?
Jul 20 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.